mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 00:52:40 +10:00
fix avatar
This commit is contained in:
@ -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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user