"use client" import Header from '@/components/Header' import Footer from '@/components/Footer' import Link from '@/components/objects/Link' import Button from '@/components/objects/Button' import FeaturedRepos from '@/components/widgets/FeaturedRepos' import Image from 'next/image' import { useState } from 'react' import { User, Smartphone } from 'lucide-react' import { useTranslation } from 'react-i18next' import { cn } from '@/lib/utils' export default function About() { const { t } = useTranslation() const [imageError, setImageError] = useState(false) const mainStrings: string[][] = [ t('about.projects', { returnObjects: true }) as string[], t('about.hobbies', { returnObjects: true }) as string[], t('about.devices', { returnObjects: true }) as string[], t('about.contributions', { returnObjects: true }) as string[], t('about.featuredProjects', { returnObjects: true }) as string[] ] const mainSections = [ t('about.sections.projects'), t('about.sections.hobbies'), t('about.sections.devices'), t('about.sections.contributions'), t('about.sections.featuredProjects') ] return (

{t('about.title')}

{mainStrings.map((section, index) => { if (mainSections[index] === t('about.sections.featuredProjects')) { return (

{mainSections[index]}

{section.map((text, index) => (

{text}

))}
) } else if (mainSections[index] === t('about.sections.contributions')) { return (

{mainSections[index]}

{section.map((text, index) => (

{text.split(/(ihatenodejs|LibreCloud Git|aidan)/).map((part, i) => { if (part === 'ihatenodejs') { return GitHub } if (part === 'LibreCloud Git') { return LibreCloud Git } if (part === 'aidan') { return aidan } return part })}

))} {!imageError && (
ihatenodejs's Stats setImageError(true)} loading="eager" priority unoptimized /> ihatenodejs's Top Languages setImageError(true)} loading="eager" priority unoptimized />
)}
) } else if (mainSections[index] === t('about.sections.devices')) { return (

{mainSections[index]}

{Object.entries(section).map(([key, value], index) => (

{key}

{(value as unknown as string[]).map((text: string, index: number) => (

{text.split(/(KernelSU-Next|LineageOS microG)/).map((part, i) => { if (part === 'KernelSU-Next') { return KernelSU-Next } if (part === 'LineageOS microG') { return LineageOS microG } return part })}

))} {key === "Phone" && (
))}
) } else if (mainSections[index] === t('about.sections.hobbies')) { return (

{mainSections[index]}

{section.map((text, index) => (

{text.split(/(my Gitea instance|my phone)/).map((part, i) => { if (part === 'my Gitea instance') { return my Gitea instance } if (part === 'my phone') { return my phone } return part })}

))}
) } else if (mainSections[index] === t('about.sections.projects')) { return (

{mainSections[index]}

{section.map((text, index) => (

{text.split(/(LibreCloud)/).map((part, i) => { if (part === 'LibreCloud') { return LibreCloud } return part })}

))}
) } else { return (

{mainSections[index]}

{section.map((text, index) => (

{text}

))}
) } })}
) }