import type { ComponentType, SVGProps } from "react"; import { config, type IconName, type LinkConfig } from "@/lib/config"; import { Card, CardHeader } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import Image from "next/image"; import Link from "next/link"; import { Finger_Paint } from "next/font/google"; import { getFollowerCounts } from "@/lib/followers"; import { headers } from "next/headers"; import { Trophy, Users } from "lucide-react"; import { Kbd } from "@/components/ui/kbd"; import Background from "@/public/background/space.webp"; import { trackUniqueVisitor } from "@/lib/visitor/unique-visitors"; import { formatCount, getCountForLink, type FollowerCounts, } from "@/lib/followers/utils"; import { DiscordIcon, DonateIcon, FormIcon, RobloxIcon, TiktokIcon, YoutubeIcon, } from "@/lib/icons"; import { LinkCarousel } from "./client"; const fingerPaint = Finger_Paint({ weight: "400", subsets: ["latin"], }); const iconMap: Record>> = { roblox: RobloxIcon, discord: DiscordIcon, tiktok: TiktokIcon, youtube: YoutubeIcon, form: FormIcon, donate: DonateIcon, leaderboard: Trophy, }; function LinkList({ counts, label, links, }: { counts: FollowerCounts; label: string; links: readonly LinkConfig[]; }) { return ( ); } export default async function Home() { const visitorCountPromise = headers() .then(trackUniqueVisitor) .catch((error) => { console.error("Failed to track visitor:", error); return 0; }); const [{ counts }, visitorCount] = await Promise.all([ getFollowerCounts(), visitorCountPromise, ]); // Use configured profile data. const profileName = config.profile.name; const profileAvatar = config.profile.avatar; const links1 = config.links; const jsonLd = { "@context": "https://schema.org", "@type": "ProfilePage", name: profileName, description: config.profile.desc, url: config.site.url, mainEntity: { "@type": "Person", name: profileName, image: profileAvatar.startsWith("/") ? `${config.site.url}${profileAvatar}` : profileAvatar, sameAs: links1.map((l) => l.link), }, }; return (