Skip to content

Commit

Permalink
feat(react): add pastel color as bg to Header's Dropdown Avatar where…
Browse files Browse the repository at this point in the history
… image is not provided
  • Loading branch information
piyumaldk committed Oct 4, 2024
1 parent f460f20 commit 6110d7b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ const UserDropdownMenu: FC<UserDropdownMenuProps> & WithWrapperProps = (
onClick={(): void => handleUserProfileNavigation()}
>
<ListItemAvatar>
<Avatar src={user?.image} alt="User">
<Avatar
src={user?.image}
alt="User"
randomBackgroundColor={!user?.image}
backgroundColorRandomizer={user?.name}
>
{user?.name?.split('')[0]}
</Avatar>
</ListItemAvatar>
Expand Down

0 comments on commit 6110d7b

Please sign in to comment.