code refactoring

This commit is contained in:
2024-05-02 17:06:09 +05:30
parent 3e80780fce
commit 11e62230d9
6 changed files with 11 additions and 14 deletions
+3 -6
View File
@@ -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)
});
}
}