import PageTransition from "@/components/home/PageTransition"; import { ProjectCard } from "@/components/home/ProjectCard"; import { Button } from "@/components/ui/button"; import { useProjects } from "@/hooks/queries/useProjects"; import { AnimatePresence, motion, useReducedMotion } from "framer-motion"; import { ArrowLeft, Brain, Cloud, Globe, Layers, Search, Smartphone, Sparkles, Workflow, } from "lucide-react"; import { useDeferredValue, useMemo, useState } from "react"; import { Link } from "react-router-dom"; const CATEGORIES = [ { id: "all", name: "All Work", icon: Layers }, { id: "web", name: "Web Systems", icon: Globe }, { id: "mobile", name: "Mobile", icon: Smartphone }, { id: "ai", name: "AI & ML", icon: Brain }, { id: "cloud", name: "Cloud Platforms", icon: Cloud }, { id: "devops", name: "DevOps", icon: Workflow }, ]; const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.04 }, }, }; export default function Projects() { const { data: projectsData, isLoading, isError } = useProjects(); const shouldReduceMotion = useReducedMotion(); const [activeCategory, setActiveCategory] = useState("all"); const [searchQuery, setSearchQuery] = useState(""); const deferredSearchQuery = useDeferredValue(searchQuery); const filteredProjects = useMemo(() => { const projects = projectsData?.data?.data || projectsData?.data || []; if (!Array.isArray(projects)) return []; return projects.filter((project) => { const matchesCategory = activeCategory === "all" || (Array.isArray(project.category) ? project.category.some( (cat: string) => cat.toLowerCase() === activeCategory.toLowerCase() || cat.toLowerCase().includes(activeCategory.toLowerCase()), ) : project.category?.toLowerCase() === activeCategory.toLowerCase()); const normalizedSearch = deferredSearchQuery.trim().toLowerCase(); const matchesSearch = normalizedSearch === "" || project.title?.toLowerCase().includes(normalizedSearch) || project.description?.toLowerCase().includes(normalizedSearch) || (Array.isArray(project.technologies) && project.technologies.some((tech: string) => tech.toLowerCase().includes(normalizedSearch), )); return matchesCategory && matchesSearch; }); }, [projectsData, activeCategory, deferredSearchQuery]); return (
{/* Back Arrow Wrapper - Kept clean on left side */}
All Projects A high-fidelity showroom tracking production ecosystems, AI operations, and cloud architectures compiled by Techzaa.
{/* Interface Control Bar Matrix - Fully Centered Substructures */} {/* Search input container centralized down the layout grid */}
setSearchQuery(e.target.value)} className="w-full pl-10 pr-4 py-2 text-sm rounded-xl border border-border bg-card/60 placeholder:text-muted-foreground/60 focus:outline-none focus:ring-2 focus:ring-primary/30 transition-all shadow-sm" aria-label="Search deployment records" />
{/* Categories Tab Matrix - Wrapped with center axis parameters */}
{CATEGORIES.map((cat) => { const Icon = cat.icon; const isActive = activeCategory === cat.id; return ( ); })}
{/* Projects View Output Section */}
{isLoading && (
{[...Array(6)].map((_, idx) => (
))}
)} {isError && (

API Synchronization Failure

Could not safely sync target records from Techzaa's data layer cluster. Confirm connection status parameters.

)} {!isLoading && !isError && ( {filteredProjects.length > 0 ? ( {filteredProjects.map((project, idx) => ( ))} ) : (

No Projects Located

Your lookup parameter variations produced zero operational matches in our architecture records.

)}
)}
); }