From 71ed416bde2c03bc6808d0857f4e59725ad0015d Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Wed, 22 Jun 2022 10:52:22 +0800 Subject: [PATCH] fix(console): display default avatar when the avatar is empty (#1191) --- .../src/components/AppContent/components/UserInfo/index.tsx | 2 +- packages/console/src/pages/UserDetails/index.tsx | 2 +- packages/console/src/pages/Users/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/console/src/components/AppContent/components/UserInfo/index.tsx b/packages/console/src/components/AppContent/components/UserInfo/index.tsx index c6d0ee121..ecc453e8e 100644 --- a/packages/console/src/components/AppContent/components/UserInfo/index.tsx +++ b/packages/console/src/components/AppContent/components/UserInfo/index.tsx @@ -45,7 +45,7 @@ const UserInfo = () => { setShowDropdown(true); }} > - +
{name || t('users.unnamed')}
diff --git a/packages/console/src/pages/UserDetails/index.tsx b/packages/console/src/pages/UserDetails/index.tsx index fd203b924..811dc9f07 100644 --- a/packages/console/src/pages/UserDetails/index.tsx +++ b/packages/console/src/pages/UserDetails/index.tsx @@ -120,7 +120,7 @@ const UserDetails = () => { {userId && data && ( <> - +
{data.name ?? '-'}
diff --git a/packages/console/src/pages/Users/index.tsx b/packages/console/src/pages/Users/index.tsx index ab972a8c2..6cbed31a9 100644 --- a/packages/console/src/pages/Users/index.tsx +++ b/packages/console/src/pages/Users/index.tsx @@ -127,7 +127,7 @@ const Users = () => { } + icon={} to={`/users/${id}`} size="compact" />