Fix(Sign): Fix the bug that the login page gets stuck when returning to the homepage

This commit is contained in:
2024-10-31 16:06:05 +08:00
parent 9d1d5b10d6
commit 1a529e4139
2 changed files with 4 additions and 7 deletions

View File

@@ -262,7 +262,9 @@ const SignIn = () => {
<FlexBox direction={'horizontal'} className={styles.addition}> <FlexBox direction={'horizontal'} className={styles.addition}>
<a <a
onClick={() => { onClick={() => {
setTimeout(() => {
navigateToRoot(navigate) navigateToRoot(navigate)
})
}} }}
> >

View File

@@ -29,11 +29,6 @@ export const tools: RouteJsonObject[] = [
icon: lazy(() => import('~icons/oxygen/installed')), icon: lazy(() => import('~icons/oxygen/installed')),
menu: true menu: true
}, },
{
path: '',
absolutePath: '/',
element: <Navigate to="/store" replace />
},
{ {
path: 'store/:username', path: 'store/:username',
absolutePath: '/store', absolutePath: '/store',
@@ -92,7 +87,7 @@ export const tools: RouteJsonObject[] = [
{ {
path: '*', path: '*',
absolutePath: '*', absolutePath: '*',
element: <Navigate to="/" replace /> element: <Navigate to="/store" replace />
} }
] ]