- 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:
lenhanphung
2026-01-13 20:44:42 +07:00
committed by GitHub
parent 00266d2701
commit 8b3afc1737
9 changed files with 206 additions and 33 deletions
+2 -1
View File
@@ -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}