refactor(projects): add type annotation to applyFilter function for improved clarity
This commit is contained in:
@@ -84,7 +84,7 @@ const filterOptions = [
|
||||
const filterButtons = Array.from(projectsRoot.querySelectorAll("[data-filter]"));
|
||||
const projectCards = Array.from(projectsRoot.querySelectorAll("[data-project-card]"));
|
||||
|
||||
const applyFilter = (activeFilter) => {
|
||||
const applyFilter = (activeFilter: string | null) => {
|
||||
projectCards.forEach((card) => {
|
||||
const projectType = card.getAttribute("data-type");
|
||||
const shouldShow = activeFilter === "all" || projectType === activeFilter;
|
||||
|
||||
Reference in New Issue
Block a user