()
| 6 | import { NotFound } from './components/NotFound' |
| 7 | |
| 8 | export function getRouter() { |
| 9 | const queryClient = new QueryClient({ |
| 10 | defaultOptions: { queries: { staleTime: 30_000 } }, |
| 11 | }) |
| 12 | |
| 13 | const router = createRouter({ |
| 14 | routeTree, |
| 15 | context: { queryClient }, |
| 16 | defaultPreload: 'intent', |
| 17 | defaultPreloadStaleTime: 0, |
| 18 | defaultErrorComponent: DefaultCatchBoundary, |
| 19 | defaultNotFoundComponent: () => <NotFound />, |
| 20 | }) |
| 21 | setupRouterSsrQueryIntegration({ |
| 22 | router, |
| 23 | queryClient, |
| 24 | }) |
| 25 | |
| 26 | return router |
| 27 | } |
| 28 | |
| 29 | declare module '@tanstack/react-router' { |
| 30 | interface Register { |
nothing calls this directly
no test coverage detected