"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|p0ntus git|aidan)/).map((part, i) => { if (part === 'ihatenodejs') { return ihatenodejs } if (part === 'p0ntus git') { return p0ntus 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 22.2|Android 16|NixOS|Xubuntu)/).map((part, i) => { if (part === 'KernelSU-Next') { return KernelSU-Next } if (part === 'LineageOS 22.2') { return LineageOS 22.2 } if (part === 'Android 16') { return Android 16 } if (part === 'NixOS') { return NixOS } if (part === 'Xubuntu') { return Xubuntu } return part })}

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

{mainSections[index]}

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

{text.split(/(my Forgejo server|my phone|AfC|OnlyNano)/).map((part, i) => { if (part === 'my Forgejo server') { return my Forgejo server } if (part === 'my phone') { return my phone } if (part === 'AfC') { return AfC } if (part === 'OnlyNano') { return OnlyNano } return part })}

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

{mainSections[index]}

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

{text.split(/(p0ntus|PontusHub|ABOCN|Kowalski|@KowalskiNodeBot)/).map((part, i) => { if (part === 'p0ntus') { return p0ntus } if (part === 'PontusHub') { return PontusHub } if (part === 'ABOCN') { return ABOCN } if (part === 'Kowalski') { return Kowalski } if (part === '@KowalskiNodeBot') { return @KowalskiNodeBot } return part })}

))}
) } else { return (

{mainSections[index]}

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

{text}

))}
) } })}
) }