mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
feat: 404 auto redirect to /
This commit is contained in:
parent
ef544e5ea0
commit
9389f23ad7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user