"use client"; import { IconLogout, IconUser } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; import { Card, CardContent, CardDescription, CardTitle, } from "@/components/ui/card"; import { signOut } from "@/lib/auth/client"; export function AccountSection({ user, }: { user: { name: string; email: string; createdAt: string; role?: string }; }) { const router = useRouter(); const memberSince = new Date(user.createdAt).toLocaleDateString(undefined, { year: "numeric", month: "long", }); const initial = user.name?.charAt(0).toUpperCase() ?? "?"; return (
Member since {memberSince}