code refactoring
This commit is contained in:
@@ -37,11 +37,8 @@ categoryClicked: boolean = false;
|
||||
this.projects = this.filter === 'All'
|
||||
? this.model.projects
|
||||
: this.model.projects.filter(
|
||||
(project: IProject) => project.category === this.filter
|
||||
);
|
||||
}
|
||||
|
||||
isCategoryActive(category: string){
|
||||
return this.filter === category;
|
||||
(project: IProject) => {
|
||||
return project.categories.includes(category)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user