diff --git a/src/components/section-item-card.tsx b/src/components/section-item-card.tsx index 1130c7a..59bddf5 100644 --- a/src/components/section-item-card.tsx +++ b/src/components/section-item-card.tsx @@ -2,7 +2,7 @@ import Image from "next/image"; -import React from "react"; +import React, { memo } from "react"; interface SectionItemCardProps { href: string; @@ -15,28 +15,26 @@ interface SectionItemCardProps { footer: string; } -export const SectionItemCard = ({ - href, - image, - title, - subtitle, - footer, -}: SectionItemCardProps) => { - return ( -
- ); -}; +export const SectionItemCard = memo( + ({ href, image, title, subtitle, footer }: SectionItemCardProps) => { + return ( + + ); + }, +); + +SectionItemCard.displayName = "SectionItemCard"; diff --git a/src/components/unified-filter-bar.tsx b/src/components/unified-filter-bar.tsx index acf8c24..68247ef 100644 --- a/src/components/unified-filter-bar.tsx +++ b/src/components/unified-filter-bar.tsx @@ -3,6 +3,7 @@ import { XMarkIcon } from "@heroicons/react/24/outline"; import { Button } from "@heroui/react"; import { motion } from "framer-motion"; +import React, { memo } from "react"; import { useFilter } from "@/contexts/filter"; import { useSearch } from "@/contexts/search"; @@ -13,6 +14,56 @@ import skills from "@/data/skills"; import { Filter, Selections } from "./filter"; import { Searchbar } from "./search"; +const AREA_OPTIONS = Object.entries(areas).map(([id, a]) => ({ + id, + name: a.name, + icon: a.icon, +})); + +const SKILL_OPTIONS = Object.entries(skills).map(([id, s]) => ({ + id, + name: s.name, + icon: s.icon, +})); + +const ROLE_OPTIONS = Object.entries(roles).map(([id, r]) => ({ + id, + name: r.name, +})); + +const FilterDropdown = memo( + ({ + selected, + setSelected, + }: { + selected: Record