"use client"; import { useState, useEffect } from "react"; import { Globe, Server, Wrench, Shield, Gamepad2, Code, Activity, Lightbulb, User, BookOpen, MessageSquare, ExternalLink, ArrowRight } 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"; import { TechStackCategory, Hobby } from "@/lib/directus"; import Link from "next/link"; import ActivityFeed from "./ActivityFeed"; 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); const [techStack, setTechStack] = useState([]); const [hobbies, setHobbies] = useState([]); useEffect(() => { const fetchData = async () => { try { const [cmsRes, techRes, hobbiesRes] = await Promise.all([ fetch(`/api/content/page?key=home-about&locale=${locale}`), fetch(`/api/tech-stack?locale=${locale}`), fetch(`/api/hobbies?locale=${locale}`) ]); const cmsData = await cmsRes.json(); if (cmsData?.content?.content) setCmsDoc(cmsData.content.content as JSONContent); const techData = await techRes.json(); if (techData?.techStack) setTechStack(techData.techStack); const hobbiesData = await hobbiesRes.json(); if (hobbiesData?.hobbies) setHobbies(hobbiesData.hobbies); } catch (error) {} }; fetchData(); }, [locale]); return (
{/* 1. Large Bio Text */}

{t("title")}

{cmsDoc ? :

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

}

{t("funFactTitle")}

{t("funFactBody")}

{/* 2. Doing Right Now (Status) */}

Doing Now

{/* Ambient Background for Status */}
{/* 3. Tech Stack */}
{techStack.map((cat) => (

{cat.name}

{cat.items?.map((item: any) => ( {item.name} ))}
))}
{/* 4. AI Chat Box */} { const chatBtn = document.querySelector('[aria-label="Open chat"]') as HTMLElement; if (chatBtn) chatBtn.click(); }} >

AI Assistant

Have questions about my projects or experience? Ask my digital twin.

Start Chat
{/* 5. Reading & Hobbies Archive Row */} {/* Reading Mini-Box */}

Reading

View Library
{/* Hobbies Mini-Box */}
{hobbies.map((hobby) => { const Icon = iconMap[hobby.icon] || Lightbulb; return (
{hobby.title}
) })}

{t("hobbiesTitle")}

Things that spark my curiosity outside of software engineering.

); }; export default About;