fix: 修复首次登录会话恢复

This commit is contained in:
que01 committed 2026-10-19 10:58:26 +08:00
1 parent 4ef4be2071
commit 8e29932bc6
6 files changed
+746 -714

No files matched your search

+12 -1
View File
@@ -59,7 +59,18 @@ export function Root() {
}}
/>
);
if (session.mustChangePassword) return <ChangePassword onComplete={() => setSession(null)} />;
if (session.mustChangePassword)
return (
<ChangePassword
onComplete={async () => {
try {
setSession(await createApiClient().getAdminSession());
} catch {
setSession(null);
}
}}
/>
);
return (
<AdminRouter>
<Dashboard