diff --git a/src/app/(routes)/(website)/components/aboutMe/AboutMeContent.tsx b/src/app/(routes)/(website)/components/aboutMe/AboutMeContent.tsx index 71a72c9..a5bfa14 100644 --- a/src/app/(routes)/(website)/components/aboutMe/AboutMeContent.tsx +++ b/src/app/(routes)/(website)/components/aboutMe/AboutMeContent.tsx @@ -15,8 +15,10 @@ const CATEGORIES = { "Architecture & Others": ["REST API", "TDD", "UI/UX Design", "Clean Architecture"], }; +type CategoryKey = keyof typeof CATEGORIES | "Other"; + export default function AboutMeContent({ data }: AboutMeContentProps) { - const categorizedSkills = { + const categorizedSkills: Record = { "Core Tech": [], "Backend & Tools": [], "Architecture & Others": [], @@ -27,7 +29,7 @@ export default function AboutMeContent({ data }: AboutMeContentProps) { let matched = false; for (const [cat, skills] of Object.entries(CATEGORIES)) { if (skills.some((s) => skill.title.toLowerCase().includes(s.toLowerCase()))) { - categorizedSkills[cat].push(skill.title); + categorizedSkills[cat as CategoryKey].push(skill.title); matched = true; break; } @@ -38,12 +40,12 @@ export default function AboutMeContent({ data }: AboutMeContentProps) { const isRTL = typeof document !== "undefined" && document.dir === "rtl"; return ( -
{/* Text Section */} - {data.description}

- +
{Object.entries(categorizedSkills).map(([category, skills]) => ( skills.length > 0 && ( -
{skills.map((skill, idx) => ( - {skill} @@ -88,7 +90,7 @@ export default function AboutMeContent({ data }: AboutMeContentProps) { {/* Image Section */} -