Skip to content

Commit

Permalink
feat: move template module declaration to the bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
oedotme committed Jan 14, 2023
1 parent 5e9b51d commit 26a343c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/tanstack-react-router/basic/src/routes.gen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ const config = root.addChildren([
])

const router = createReactRouter({ routeConfig: config, defaultPreload: 'intent' })
export const Routes = () => <RouterProvider router={router} />

declare module '@tanstack/react-router' {
interface RegisterRouter {
router: typeof router
}
}

export const Routes = () => <RouterProvider router={router} />
3 changes: 1 addition & 2 deletions plugins/tanstack-react-router/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ const config = root.addChildren([
])
const router = createReactRouter({ routeConfig: config, defaultPreload: 'intent' })
export const Routes = () => <RouterProvider router={router} />
declare module '@tanstack/react-router' {
interface RegisterRouter {
router: typeof router
}
}
export const Routes = () => <RouterProvider router={router} />
`

0 comments on commit 26a343c

Please sign in to comment.