From 2f0c4300df302499eafbba7c55ea098bcb44515e Mon Sep 17 00:00:00 2001 From: zhaoying Date: Thu, 16 Apr 2026 10:32:34 +0800 Subject: [PATCH] fix(web): userinfo --- web/src/components/Header/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/src/components/Header/index.tsx b/web/src/components/Header/index.tsx index 23a89894..fedc62e6 100644 --- a/web/src/components/Header/index.tsx +++ b/web/src/components/Header/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:07:49 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-04-07 12:18:58 + * @Last Modified time: 2026-04-16 11:10:19 */ /** * AppHeader Component @@ -76,9 +76,11 @@ const AppHeader: FC<{source?: 'space' | 'manage';}> = ({source = 'manage'}) => { const userMenuItems: MenuProps['items'] = [ { key: '1', - icon: - {/[\u4e00-\u9fa5]/.test(user.username) ? user.username.slice(-2) : user.username[0]} - , + icon: user.username + ? + {/[\u4e00-\u9fa5]/.test(user.username) ? user.username.slice(-2) : user.username[0]} + + : null, label: (<>
{user.username}
{user.email}
@@ -181,9 +183,9 @@ const AppHeader: FC<{source?: 'space' | 'manage';}> = ({source = 'manage'}) => { overlayClassName={styles.userDropdown} > - + {user.username && {/[\u4e00-\u9fa5]/.test(user.username) ? user.username.slice(-2) : user.username[0]} - + } {user.username}