"use client"; import { use } from "react"; import { motion, Variants } from "framer-motion"; import Link from "next/link"; import { Globe, Smartphone, Server } from "lucide-react"; import { PROJECT_REGISTRY } from "@/data/projects"; import PageLayout from "@/components/PageLayout"; const CATEGORY_META = { web: { title: "Web Systems", icon: , description: "Architecting scalable web applications and distributed systems.", }, mobile: { title: "Mobile Apps", icon: , description: "Building cross-platform experiences with Flutter and native integrations.", }, infrastructure: { title: "DevOps & Infrastructure", icon: , description: "Self-hosted systems architecture and automated deployment pipelines.", }, }; // 1. Cast the container variants const containerVariants: Variants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1 }, }, }; // 2. Cast the item variants const itemVariants: Variants = { hidden: { opacity: 0, x: -20 }, visible: { opacity: 1, x: 0, transition: { duration: 0.4, ease: "easeOut", // TypeScript now knows this is a valid Easing string }, }, }; export default function CategoryPage({ params, }: { params: Promise<{ category: string }>; }) { const resolvedParams = use(params); const category = resolvedParams.category; const meta = CATEGORY_META[category as keyof typeof CATEGORY_META]; const filteredProjects = PROJECT_REGISTRY.filter( (p) => p.category === category, ); if (!meta) return Sector not found.; return (

{meta.icon} {meta.title}

{meta.description}

{/* 2. The container manages the entrance of all children */} {filteredProjects.map((project) => (

{project.title}

{project.description}

{project.stack.map((tech) => ( {tech} ))}
))}
); }