- Replace avatar image from API with gradient avatar from twake-mui (#457)
- Display 2-letter initials (e.g., "JD" for "John Doe") instead of single letter - Add getInitials helper function in avatarUtils for reusability - Update Avatar in PeopleSearch, CalendarSearch, and Menubar components - Remove avatarUrl prop usage across all Avatar components
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
ListItemText,
|
||||
TextField,
|
||||
} from "@linagora/twake-mui";
|
||||
import { stringAvatar } from "../Event/utils/eventUtils";
|
||||
import {
|
||||
type ReactNode,
|
||||
useCallback,
|
||||
@@ -287,7 +288,7 @@ export function PeopleSearch({
|
||||
return (
|
||||
<ListItem key={key + option?.email} {...otherProps} disableGutters>
|
||||
<ListItemAvatar>
|
||||
<Avatar src={option.avatarUrl} alt={option.displayName} />
|
||||
<Avatar {...stringAvatar(option.displayName || option.email)} />
|
||||
</ListItemAvatar>
|
||||
<ListItemText
|
||||
primary={option.displayName}
|
||||
|
||||
Reference in New Issue
Block a user