"use client" import Link from "next/link"; import { authClient } from "@/util/auth-client"; import { useRouter } from "next/navigation"; interface ExtendedUser { id: string; name: string; email: string; emailVerified: boolean; createdAt: Date; updatedAt: Date; image?: string | null; role?: string; } export function Nav() { const { data: session, isPending } = authClient.useSession(); const router = useRouter(); const handleSignOut = async () => { try { await fetch("/api/logout", { method: "POST", }); await authClient.signOut(); router.refresh(); } catch (error) { console.error("Sign out error:", error); } }; return (