import type { Metadata } from "next"; import Link from "next/link"; import { getServerSession } from "next-auth"; import { ArrowLeft } from "lucide-react"; import { authOptions } from "@/lib/auth/auth-options"; import { getSessionDiscordId } from "@/lib/auth/auth"; import { loadGuildProfile } from "@/lib/profile/guild-profile"; import { ProfileLoginCard } from "@/components/profile/profile-login-card"; import { ProfilePassport } from "@/components/profile/profile-passport"; import { RealtimeRefresh } from "@/components/realtime-refresh"; import { ThemeToggle } from "@/components/theme-toggle"; import { Button } from "@/components/ui/button"; export const dynamic = "force-dynamic"; export const metadata: Metadata = { title: "โปรไฟล์ของฉัน", description: "ดูเลเวล XP เวลาในห้องเสียง และอันดับ Discord ของคุณใน Erika!", alternates: { canonical: "/profile" }, robots: { index: false, follow: false }, }; export default async function ProfilePage() { const session = await getServerSession(authOptions); const discordId = getSessionDiscordId(session); let content = ; if (session?.user && discordId) { const guildProfile = await loadGuildProfile(discordId); content = ( <> ); } return (
{content}
); }