"use client"; import { motion } from "framer-motion"; import { useState } from "react"; import Link from "next/link"; import Header from "@/components/Header"; import Footer from "@/components/Footer"; import type { Locale } from "@/i18n-config"; const expo = [0.16, 1, 0.3, 1] as [number, number, number, number]; const IconArrowUpRight = () => ( ); export default function WorkClient({ lang, dict, initialProjects, }: { lang: Locale; dict: any; initialProjects?: any[]; }) { const [hoverCase, setHoverCase] = useState(null); const accentColors = ["#FFE600", "#FF4500", "#0A0A0A", "#00CC77"]; const projectsList = initialProjects && initialProjects.length > 0 ? initialProjects : (dict.work.items as any[]); const caseStudies = projectsList.map((item: any, idx: number) => ({ ...item, accent: accentColors[idx % accentColors.length] ?? "#FFE600", // Fallback tech in case older dict snapshot doesn't have it yet tech: item.tech ?? ["React", "TypeScript", "Node.js"], })); return ( {/* Page header */} {dict.work.badge} {dict.work.title} {/* Case study list */} {caseStudies.map((study: any, idx: number) => ( setHoverCase(idx)} onHoverEnd={() => setHoverCase(null)} > {/* Full-card link */} {/* Accent top bar */} {/* Left column */} {study.tag} {study.title} {dict.work.specsLabel}: {study.spec} {study.num} {/* Right column */} {study.desc} {(study.tech as string[]).map((t) => ( {t} ))} {/* Button sits above the overlay link via z-20 */} {dict.work.analyzeBtn} ))} ); }
{study.desc}