Open History to see the last commit
1import { createRouter } from '@tanstack/react-router'
2import { routeTree } from './routeTree.gen'
3import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
4import { NotFound } from './components/NotFound'
5β
6export function getRouter() {
7 const router = createRouter({
8 routeTree,
9 basepath: '/test/',
10 defaultPreload: 'intent',
11 defaultErrorComponent: DefaultCatchBoundary,
12 defaultNotFoundComponent: () => <NotFound />,
13 scrollRestoration: true,
14 })
15β
16 return router
17}