"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 (
{project.description}
Release Date
{new Date(project.date).toLocaleDateString(locale, { year: 'numeric', month: 'long' })}
Category
{project.category}