fix: 修复首次登录会话恢复
This commit is contained in:
1 parent
4ef4be2071
commit
8e29932bc6
6 files changed
+746
-714
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user