From 8bc11c0de18c5b3fba863f8bac728572e676da00 Mon Sep 17 00:00:00 2001 From: zly Date: Tue, 24 Mar 2026 17:58:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(overview):=20=E4=BF=AE=E5=A4=8D=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=9C=AA=E8=83=BD=E6=AD=A3=E7=A1=AE=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dashboard/workplace/overview.tsx | 4 ++-- src/store/user.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/dashboard/workplace/overview.tsx b/src/pages/dashboard/workplace/overview.tsx index 78ee815..2ff1479 100644 --- a/src/pages/dashboard/workplace/overview.tsx +++ b/src/pages/dashboard/workplace/overview.tsx @@ -61,7 +61,7 @@ function Overview() { const [loading, setLoading] = useState(true); const t = useLocale(locale); - const userInfo = useSelector((state: any) => state.userInfo || {}); + const userInfo = useSelector((state: any) => state.user?.userInfo || {}); const fetchData = async () => { setLoading(true); @@ -79,7 +79,7 @@ function Overview() { {t['workplace.welcomeBack']} - {userInfo.name} + {userInfo.username} diff --git a/src/store/user.ts b/src/store/user.ts index 849b4ba..44ac889 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -3,6 +3,7 @@ import { createSlice } from '@reduxjs/toolkit'; export interface UserState { userInfo?: { name?: string; + username?: string; avatar?: string; job?: string; organization?: string;