import type { Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; import { ActionForm, SubmitButton } from "@/components/forms"; import { PageHeader, Tag } from "@/components/status"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { api, getMe, isModerator, unwrap } from "@/lib/api"; import { linkAccount, signOutComputers } from "./actions"; import { AgeCard } from "./age-card"; import { ChallengeCard } from "./challenge-card"; import { LinkCard } from "./link-card"; export const metadata: Metadata = { title: "Account" }; export default async function Account({ searchParams }: { searchParams: Promise<{ welcome?: string; age?: string }> }) { const me = await getMe(); if (!me) redirect("/signin?next=/account"); const [account, age] = await Promise.all([api.account.get().then(unwrap), api.age.get().then(unwrap)]); const { person, links, challenges, computers } = account; const params = await searchParams; const welcome = params.welcome !== undefined; return (
No IMVU accounts linked yet.
)}You've linked as many IMVU accounts as you can ({person.linkCap}). Ask a moderator if you need more.
)}Other people can't see which IMVU accounts are yours. Adult IMVU accounts can see adult community products: those IMVU has age verified (or with Access Pass), or all of them once you verify your age below.
{computers > 0 ? `Signed in on ${computers} computer${computers === 1 ? "" : "s"}.` : "Not signed in on any computer yet."}{" "} To sign T5DE in, it shows a code to enter at{" "} /device .
{computers > 0 && (