import { Link, useNavigate } from "react-router"; import { authClient } from "~/lib/auth-client"; import { Popover, PopoverContent, PopoverTrigger } from "~/components/ui/popover"; import { Button } from "~/components/ui/button"; import { UserAvatar } from "~/components/ui/UserAvatar"; import type { RawFlagConfig } from "~/lib/flag-types"; interface UserMenuProps { userId: string; name: string | null; email: string; customAvatarUrl?: string | null; flagConfig?: RawFlagConfig | null; avatarType?: string | null; } export function UserMenu({ userId, name, email, customAvatarUrl, flagConfig, avatarType, }: UserMenuProps) { const navigate = useNavigate(); async function handleSignOut() { await authClient.signOut(); navigate("/"); } return (

{name ?? email}

{email}

Settings
); }