Alejandra
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
13 additions and
2 deletions
-
frontend/src/routes/__root.tsx
|
@ -1,13 +1,24 @@ |
|
|
|
|
|
import React, { Suspense } from 'react' |
|
|
import { createRootRoute, Outlet } from '@tanstack/react-router' |
|
|
import { createRootRoute, Outlet } from '@tanstack/react-router' |
|
|
import { TanStackRouterDevtools } from '@tanstack/router-devtools' |
|
|
|
|
|
|
|
|
|
|
|
import NotFound from '../components/Common/NotFound' |
|
|
import NotFound from '../components/Common/NotFound' |
|
|
|
|
|
|
|
|
|
|
|
const TanStackRouterDevtools = |
|
|
|
|
|
process.env.NODE_ENV === 'production' |
|
|
|
|
|
? () => null |
|
|
|
|
|
: React.lazy(() => |
|
|
|
|
|
import('@tanstack/router-devtools').then((res) => ({ |
|
|
|
|
|
default: res.TanStackRouterDevtools, |
|
|
|
|
|
})), |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
export const Route = createRootRoute({ |
|
|
export const Route = createRootRoute({ |
|
|
component: () => ( |
|
|
component: () => ( |
|
|
<> |
|
|
<> |
|
|
<Outlet /> |
|
|
<Outlet /> |
|
|
|
|
|
<Suspense> |
|
|
<TanStackRouterDevtools /> |
|
|
<TanStackRouterDevtools /> |
|
|
|
|
|
</Suspense> |
|
|
</> |
|
|
</> |
|
|
), |
|
|
), |
|
|
notFoundComponent: () => <NotFound />, |
|
|
notFoundComponent: () => <NotFound />, |
|
|