'use client'; import Image from 'next/image'; import { type Session } from 'next-auth'; import { signOut } from 'next-auth/react'; import { Button } from '@/components/ui/Button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/DropdownMenu'; import { IconExternalLink } from '@/components/ui/Icons'; import Avatar from './Avatar'; export interface UserMenuProps { user: Session['user']; } function getUserInitials(name: string) { const [firstName, lastName] = name.split(' '); return lastName ? `${firstName[0]}${lastName[0]}` : firstName.slice(0, 2); } export function UserMenu({ user }: UserMenuProps) { return (