"use client"; import { useState, useEffect } from "react"; import { motion } from "framer-motion"; import { ArrowUpRight } from "lucide-react"; import Link from "next/link"; import Image from "next/image"; import { useLocale, useTranslations } from "next-intl"; interface Project { id: number; slug: string; title: string; description: string; content: string; tags: string[]; featured: boolean; category: string; date: string; github?: string; live?: string; imageUrl?: string; } const Projects = () => { const [projects, setProjects] = useState([]); const locale = useLocale(); const t = useTranslations("home.projects"); useEffect(() => { const loadProjects = async () => { try { const response = await fetch("/api/projects?featured=true&published=true&limit=6"); if (response.ok) { const data = await response.json(); setProjects(data.projects || []); } } catch (error) {} }; loadProjects(); }, []); return (

Selected Work

Projects that pushed my boundaries.

View Archive
{projects.map((project) => ( {/* Image Card */}
{project.imageUrl ? ( {project.title} ) : (
{project.title.charAt(0)}
)} {/* Overlay on Hover */}
{/* Text Content */}

{project.title}

{project.description}

{project.tags.slice(0, 2).map(tag => ( {tag} ))}
))}
); }; export default Projects;