Initial commit
This commit is contained in:
16
apps/frontend/src/routes/__root.tsx
Normal file
16
apps/frontend/src/routes/__root.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Outlet, createRootRouteWithContext } from '@tanstack/react-router'
|
||||
import type { AuthContextValue } from '@/lib/auth'
|
||||
import type { ApiClient } from '@/lib/api-client'
|
||||
import { NotFoundPage } from '@/features/not-found/not-found-page'
|
||||
import { ServerErrorPage } from '@/features/server-error/server-error-page'
|
||||
|
||||
type RouterContext = {
|
||||
auth: AuthContextValue
|
||||
api: ApiClient
|
||||
}
|
||||
|
||||
export const Route = createRootRouteWithContext<RouterContext>()({
|
||||
component: Outlet,
|
||||
errorComponent: ServerErrorPage,
|
||||
notFoundComponent: NotFoundPage,
|
||||
})
|
||||
Reference in New Issue
Block a user