mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Jump to status page if session is present and valid
This commit is contained in:
parent
161b465499
commit
9c9b7a98bf
@ -79,8 +79,16 @@ export const router = createHashRouter([
|
||||
path: "/",
|
||||
element: <LoginPage />,
|
||||
loader: async () => {
|
||||
if(await isLoggedIn())
|
||||
{
|
||||
state.loggedIn = true;
|
||||
state.startupComplete = true;
|
||||
await router.navigate(`/${Pages.Status}`);
|
||||
return;
|
||||
}
|
||||
state.activePage = Pages.Login;
|
||||
state.startupComplete = true;
|
||||
state.loggedIn = false;
|
||||
return null;
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user