import Footer from "@/components/footer"; import Header from "@/components/header"; import { Separator } from "@/components/ui/separator"; import { getCurrentUser } from "@/lib/user"; import { formatDate } from "@/lib/utils"; import { BookOpenTextIcon, SignatureIcon, UserIcon } from "lucide-react"; import { redirect } from "next/navigation"; import { DeleteDialog } from "./delete-dialog"; import { LogoutButton } from "./logout-button"; import { UpdateButton } from "./update-button"; import { AccountMenu } from "./account-menu"; function ProfileField({ label, value }: { label: string; value: string }) { return (

{label}

{value}

); } export default async function Account() { const user = await getCurrentUser(); if (!user) redirect("/"); return ( <>

Personal details

Synced from your Kotosoft ID account. To correct any details, update them there first, then click Update below.

{user.isAdmin && }

Update personal details

Syncs your name, email, and birthday from Kotosoft ID

Log out

Log out from your account on this device

Delete account

Permanently delete your account and all associated data