fix avatar

This commit is contained in:
Philipinho
2024-03-22 20:19:42 +00:00
parent 51baf30f0d
commit 4657672dfe

View File

@ -15,8 +15,8 @@ export const UserAvatar = React.forwardRef<HTMLInputElement, UserAvatarProps>(
({ avatarUrl, name, ...props }: UserAvatarProps, ref) => { ({ avatarUrl, name, ...props }: UserAvatarProps, ref) => {
const getInitials = (name: string) => { const getInitials = (name: string) => {
const names = name.split(' '); const names = name?.split(' ');
return names.slice(0, 2).map(n => n[0]).join(''); return names?.slice(0, 2).map(n => n[0]).join('');
}; };
return ( return (