feat: 404 auto redirect to /

This commit is contained in:
Ou 2024-10-05 02:36:54 +08:00
parent ef544e5ea0
commit 9389f23ad7

View File

@ -12,9 +12,18 @@ export const Route = createRootRouteWithContext<{
queryClient: QueryClient
}>()({
component: RootComponent,
notFoundComponent: NotFoundComponent,
})
export function RootComponent() {
function NotFoundComponent() {
const nav = Route.useNavigate()
nav({
to: "/",
})
return <div></div>
}
function RootComponent() {
useOnReload()
return (
<OverlayScrollbarsComponent