import { AuthTokenPayload, UserRef } from "@vertesia/common"; /** * UserAvatar * Show user picture, name and email **/ export function UserAvatar({ user }: { user: AuthTokenPayload | UserRef; }) { const userPicture = () => { if (!user.picture) { const initials = user.name.split(' ').map((n) => n[0]).join(''); return {initials} } else { return {user.name} } } return (
{userPicture()}

{user.name ?? 'Deleted User'}

{user.email ?? 'Deleted User'}

); }