- 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
+4 -4
View File
@@ -100,7 +100,7 @@ describe("Calendar App Component Display Tests", () => {
/>,
preloadedState
);
expect(screen.getByText("t")).toBeInTheDocument();
expect(screen.getByText("T")).toBeInTheDocument();
});
// Edge cases for avatar display logic
@@ -131,7 +131,7 @@ describe("Calendar App Component Display Tests", () => {
/>,
preloadedState
);
expect(screen.getByText("t")).toBeInTheDocument();
expect(screen.getByText("T")).toBeInTheDocument();
});
it("handles user with only name", () => {
@@ -161,7 +161,7 @@ describe("Calendar App Component Display Tests", () => {
/>,
preloadedState
);
expect(screen.getByText("t")).toBeInTheDocument();
expect(screen.getByText("T")).toBeInTheDocument();
});
it("handles user with both name and family_name", () => {
@@ -221,7 +221,7 @@ describe("Calendar App Component Display Tests", () => {
/>,
preloadedState
);
expect(screen.getByText("t")).toBeInTheDocument();
expect(screen.getByText("T")).toBeInTheDocument();
});
it("handles user with empty email", () => {