"use client"; import { useState, useEffect } from "react"; import { BentoGrid, BentoGridItem } from "./ui/BentoGrid"; import { IconClipboardCopy, IconFileBroken, IconSignature, IconTableColumn, } from "@tabler/icons-react"; // Wir nutzen Lucide, ich tausche die gleich aus import { Globe, Server, Wrench, Shield, Gamepad2, Code, Activity, Lightbulb, MapPin, User } from "lucide-react"; import { useLocale, useTranslations } from "next-intl"; import type { JSONContent } from "@tiptap/react"; import RichTextClient from "./RichTextClient"; import CurrentlyReading from "./CurrentlyReading"; import ReadBooks from "./ReadBooks"; import { motion } from "framer-motion"; // Helper for Tech Stack Icons const iconMap: Record = { Globe, Server, Code, Wrench, Shield, Activity, Lightbulb, Gamepad2 }; const About = () => { const locale = useLocale(); const t = useTranslations("home.about"); const [cmsDoc, setCmsDoc] = useState(null); // Data State const [techStack, setTechStack] = useState([]); const [hobbies, setHobbies] = useState([]); useEffect(() => { // Load Content Page (async () => { try { const res = await fetch(`/api/content/page?key=home-about&locale=${locale}`); const data = await res.json(); if (data?.content?.content) setCmsDoc(data.content.content as JSONContent); } catch {} })(); // Load Tech Stack (async () => { try { const res = await fetch(`/api/tech-stack?locale=${locale}`); const data = await res.json(); if (data?.techStack) setTechStack(data.techStack); } catch {} })(); // Load Hobbies (async () => { try { const res = await fetch(`/api/hobbies?locale=${locale}`); const data = await res.json(); if (data?.hobbies) setHobbies(data.hobbies); } catch {} })(); }, [locale]); return (
{/* Background Noise/Gradient */}
{t("title")}
{/* 1. The Bio (Large Item) */} Dennis Konkol } description={
{cmsDoc ? ( ) : (

{t("p1")} {t("p2")}

)}
} header={
Software Engineer
} /> {/* 2. Location & Status */} } header={
Online & Active
} /> {/* 3. Tech Stack (Marquee Style or Grid) */} {techStack.length > 0 ? ( techStack.slice(0, 8).flatMap(cat => cat.items.map((item: any) => ( {item.name} ))).slice(0, 12) ) : (
Loading Stack...
)} } icon={} /> {/* 4. Currently Reading */}
Reading
} /> {/* 5. Hobbies */} {hobbies.map((hobby, i) => { const Icon = iconMap[hobby.icon] || Lightbulb; return (
{hobby.title}
) })} } icon={} />
); }; export default About;