From e086403c2da0a3368d984a653f9d2b0d69e75b1d Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Mon, 22 Jun 2026 14:43:08 +0800 Subject: [PATCH] fix(dashboard): fix logout button behavior by adding page reload and hiding button when auth is not required --- dashboard/src/components/AppShell.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dashboard/src/components/AppShell.tsx b/dashboard/src/components/AppShell.tsx index b166e14..9e1271e 100644 --- a/dashboard/src/components/AppShell.tsx +++ b/dashboard/src/components/AppShell.tsx @@ -209,11 +209,14 @@ export function AppShell() { summary={summary} metrics={metrics} onToggleSidebar={() => setSidebarCollapsed((value) => !value)} - onLogout={() => { - window.localStorage.removeItem('xworkspace-bridge-token'); - setAuthToken(''); - setTokenInput(''); - }} + onLogout={ + authRequired + ? () => { + window.localStorage.removeItem('xworkspace-bridge-token'); + window.location.reload(); + } + : undefined + } />