From 24a090850fc0eff2cb7d1de6b5ec8a89ff8ae5a4 Mon Sep 17 00:00:00 2001 From: lizerk Date: Mon, 13 Apr 2026 16:07:53 +0300 Subject: [PATCH] fix(frontend): remove nested avatar fallback shells --- frontend/src/app/employees/page.tsx | 8 ++++---- frontend/src/app/profile/page.tsx | 8 ++++---- frontend/src/app/users/[id]/page.tsx | 8 ++++---- frontend/src/components/users/EditUserProfileModal.tsx | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/employees/page.tsx b/frontend/src/app/employees/page.tsx index 7cedb04d..425fb339 100644 --- a/frontend/src/app/employees/page.tsx +++ b/frontend/src/app/employees/page.tsx @@ -188,7 +188,9 @@ export default function EmployeesPage() { href={`/users/${employee.id}`} className="flex min-w-0 flex-1 items-center gap-4" > -
+
{employee.avatar ? ( ) : ( - - {initials} - + initials )}
diff --git a/frontend/src/app/profile/page.tsx b/frontend/src/app/profile/page.tsx index 30629b3b..bffaa420 100644 --- a/frontend/src/app/profile/page.tsx +++ b/frontend/src/app/profile/page.tsx @@ -122,7 +122,9 @@ export default function ProfilePage() { ) : null } avatar={ -
+
{user.avatar ? ( ) : ( -
- {initials(user.first_name, user.last_name)} -
+ initials(user.first_name, user.last_name) )}
} diff --git a/frontend/src/app/users/[id]/page.tsx b/frontend/src/app/users/[id]/page.tsx index 5f0e539a..2e04a340 100644 --- a/frontend/src/app/users/[id]/page.tsx +++ b/frontend/src/app/users/[id]/page.tsx @@ -318,7 +318,9 @@ export default function UserDetailPage() { ) : null } avatar={ -
+
{avatarUrl && !avatarFailed ? ( ) : ( -
- {initials} -
+ initials )}
} diff --git a/frontend/src/components/users/EditUserProfileModal.tsx b/frontend/src/components/users/EditUserProfileModal.tsx index bc9c1e2a..16ab0d1a 100644 --- a/frontend/src/components/users/EditUserProfileModal.tsx +++ b/frontend/src/components/users/EditUserProfileModal.tsx @@ -116,7 +116,9 @@ export default function EditUserProfileModal({
-
+
{form.avatarPreview ? ( ) : ( - - {initials} - + initials )}