'use client' import { useCurrentUser } from '@/hooks/useCurrentUser' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/dropdown-menu' import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { IoExitOutline } from 'react-icons/io5' import LogoutButton from '@/components/auth/logout-button' const fallbackInitials = (name?: string | null | undefined): string => { return (name ?? '').split(' ').map((w: string) => w[0]).join('').toUpperCase() } const UserButton = () => { const user = useCurrentUser() return ( {fallbackInitials(user?.name)} Logout ) } export default UserButton