99// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
1010
1111import { Route as rootRouteImport } from './app/routes/__root'
12- import { Route as DashboardRouteImport } from './app/routes/dashboard '
12+ import { Route as AuthRouteImport } from './app/routes/_auth '
1313import { Route as IndexRouteImport } from './app/routes/index'
14+ import { Route as AuthDashboardRouteImport } from './app/routes/_auth/dashboard'
1415
15- const DashboardRoute = DashboardRouteImport . update ( {
16- id : '/dashboard' ,
17- path : '/dashboard' ,
16+ const AuthRoute = AuthRouteImport . update ( {
17+ id : '/_auth' ,
1818 getParentRoute : ( ) => rootRouteImport ,
1919} as any )
2020const IndexRoute = IndexRouteImport . update ( {
2121 id : '/' ,
2222 path : '/' ,
2323 getParentRoute : ( ) => rootRouteImport ,
2424} as any )
25+ const AuthDashboardRoute = AuthDashboardRouteImport . update ( {
26+ id : '/dashboard' ,
27+ path : '/dashboard' ,
28+ getParentRoute : ( ) => AuthRoute ,
29+ } as any )
2530
2631export interface FileRoutesByFullPath {
2732 '/' : typeof IndexRoute
28- '/dashboard' : typeof DashboardRoute
33+ '/dashboard' : typeof AuthDashboardRoute
2934}
3035export interface FileRoutesByTo {
3136 '/' : typeof IndexRoute
32- '/dashboard' : typeof DashboardRoute
37+ '/dashboard' : typeof AuthDashboardRoute
3338}
3439export interface FileRoutesById {
3540 __root__ : typeof rootRouteImport
3641 '/' : typeof IndexRoute
37- '/dashboard' : typeof DashboardRoute
42+ '/_auth' : typeof AuthRouteWithChildren
43+ '/_auth/dashboard' : typeof AuthDashboardRoute
3844}
3945export interface FileRouteTypes {
4046 fileRoutesByFullPath : FileRoutesByFullPath
4147 fullPaths : '/' | '/dashboard'
4248 fileRoutesByTo : FileRoutesByTo
4349 to : '/' | '/dashboard'
44- id : '__root__' | '/' | '/dashboard'
50+ id : '__root__' | '/' | '/_auth' | '/_auth/ dashboard'
4551 fileRoutesById : FileRoutesById
4652}
4753export interface RootRouteChildren {
4854 IndexRoute : typeof IndexRoute
49- DashboardRoute : typeof DashboardRoute
55+ AuthRoute : typeof AuthRouteWithChildren
5056}
5157
5258declare module '@tanstack/react-router' {
5359 interface FileRoutesByPath {
54- '/dashboard ' : {
55- id : '/dashboard '
56- path : '/dashboard '
57- fullPath : '/dashboard '
58- preLoaderRoute : typeof DashboardRouteImport
60+ '/_auth ' : {
61+ id : '/_auth '
62+ path : ''
63+ fullPath : ''
64+ preLoaderRoute : typeof AuthRouteImport
5965 parentRoute : typeof rootRouteImport
6066 }
6167 '/' : {
@@ -65,12 +71,29 @@ declare module '@tanstack/react-router' {
6571 preLoaderRoute : typeof IndexRouteImport
6672 parentRoute : typeof rootRouteImport
6773 }
74+ '/_auth/dashboard' : {
75+ id : '/_auth/dashboard'
76+ path : '/dashboard'
77+ fullPath : '/dashboard'
78+ preLoaderRoute : typeof AuthDashboardRouteImport
79+ parentRoute : typeof AuthRoute
80+ }
6881 }
6982}
7083
84+ interface AuthRouteChildren {
85+ AuthDashboardRoute : typeof AuthDashboardRoute
86+ }
87+
88+ const AuthRouteChildren : AuthRouteChildren = {
89+ AuthDashboardRoute : AuthDashboardRoute ,
90+ }
91+
92+ const AuthRouteWithChildren = AuthRoute . _addFileChildren ( AuthRouteChildren )
93+
7194const rootRouteChildren : RootRouteChildren = {
7295 IndexRoute : IndexRoute ,
73- DashboardRoute : DashboardRoute ,
96+ AuthRoute : AuthRouteWithChildren ,
7497}
7598export const routeTree = rootRouteImport
7699 . _addFileChildren ( rootRouteChildren )
0 commit comments