"use client"; import { motion, Variants } from "framer-motion"; import { Globe, Server, Wrench, Shield, Gamepad2, Code, Activity, Lightbulb } from "lucide-react"; import { useEffect, useState } from "react"; import { useLocale, useTranslations } from "next-intl"; import type { JSONContent } from "@tiptap/react"; import RichTextClient from "./RichTextClient"; const staggerContainer: Variants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.15, delayChildren: 0.2, }, }, }; const fadeInUp: Variants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.25, 0.1, 0.25, 1], }, }, }; const About = () => { const locale = useLocale(); const t = useTranslations("home.about"); const [cmsDoc, setCmsDoc] = useState(null); useEffect(() => { (async () => { try { const res = await fetch( `/api/content/page?key=${encodeURIComponent("home-about")}&locale=${encodeURIComponent(locale)}`, ); const data = await res.json(); if (data?.content?.content) { setCmsDoc(data.content.content as JSONContent); } } catch { // ignore; fallback to static } })(); }, [locale]); const techStack = [ { category: "Frontend & Mobile", icon: Globe, items: ["Next.js", "Tailwind CSS", "Flutter"], }, { category: "Backend & DevOps", icon: Server, items: ["Docker Swarm", "Traefik", "Nginx Proxy Manager", "Redis"], }, { category: "Tools & Automation", icon: Wrench, items: ["Git", "CI/CD", "n8n", "Self-hosted Services"], }, { category: "Security & Admin", icon: Shield, items: ["CrowdSec", "Suricata", "Mailcow"], }, ]; const hobbies: Array<{ icon: typeof Code; text: string }> = [ { icon: Code, text: "Self-Hosting & DevOps" }, { icon: Gamepad2, text: "Gaming" }, { icon: Server, text: "Setting up Game Servers" }, { icon: Activity, text: "Jogging to clear my mind and stay active" }, ]; return (
{/* Text Content */} {t("title")} {cmsDoc ? ( ) : ( <>

{t("p1")}

{t("p2")}

{t("p3")}

)}

{t("funFactTitle")}

{t("funFactBody")}

{/* Tech Stack & Hobbies */}
My Tech Stack
{techStack.map((stack, idx) => (

{stack.category}

{stack.items.map((item, itemIdx) => ( {item} ))}
))}
{/* Hobbies */}
When I'm Not Coding
{hobbies.map((hobby, idx) => ( {hobby.text} ))}
); }; export default About;