"use client"; import { motion } from "framer-motion"; import { ExternalLink, Calendar, ArrowLeft, Github as GithubIcon, Share2, Code } from "lucide-react"; import Link from "next/link"; import { useEffect } from "react"; import ReactMarkdown from "react-markdown"; import { useTranslations } from "next-intl"; import Image from "next/image"; export type ProjectDetailData = { id: number; slug: string; title: string; description: string; content: string; tags: string[]; featured: boolean; category: string; date: string; github?: string | null; live?: string | null; button_live_label?: string | null; button_github_label?: string | null; imageUrl?: string | null; technologies?: string[]; }; export default function ProjectDetailClient({ project, locale, }: { project: ProjectDetailData; locale: string; }) { const tCommon = useTranslations("common"); const tDetail = useTranslations("projects.detail"); const tShared = useTranslations("projects.shared"); useEffect(() => { try { navigator.sendBeacon?.( "/api/analytics/track", new Blob([JSON.stringify({ type: "pageview", projectId: project.id.toString(), page: `/${locale}/projects/${project.slug}` })], { type: "application/json" }), ); } catch {} }, [project.id, project.slug, locale]); return (
{/* Navigation */} {tCommon("backToProjects")} {/* Title Section */}

{project.title}.

{project.description}

{/* Feature Image Box */}
{project.imageUrl ? ( {project.title} ) : (
{project.title.charAt(0)}
)}
{/* Bento Details Grid */}
{/* Main Content */}
{project.content}
{/* Sidebar Boxes */}
{/* Quick Links Box */} {/* Tech Stack Box */}

Stack

{project.tags.map((tag) => ( {tag} ))}
{/* Meta Stats */}

Release Date

{new Date(project.date).toLocaleDateString(locale, { year: 'numeric', month: 'long' })}

Category

{project.category}

); }