11
11
// Import Routes
12
12
13
13
import { Route as rootRoute } from './routes/__root'
14
- import { Route as ProjectsImport } from './routes/projects '
14
+ import { Route as HasUserGuardImport } from './routes/_hasUserGuard '
15
15
import { Route as IndexImport } from './routes/index'
16
+ import { Route as ProjectsIndexImport } from './routes/projects/index'
17
+ import { Route as UserSetImport } from './routes/user/set'
18
+ import { Route as ProjectsProjectIdIndexImport } from './routes/projects/$projectId/index'
16
19
17
20
// Create/Update Routes
18
21
19
- const ProjectsRoute = ProjectsImport . update ( {
20
- path : '/projects ' ,
22
+ const HasUserGuardRoute = HasUserGuardImport . update ( {
23
+ id : '/_hasUserGuard ' ,
21
24
getParentRoute : ( ) => rootRoute ,
22
25
} as any )
23
26
@@ -26,6 +29,21 @@ const IndexRoute = IndexImport.update({
26
29
getParentRoute : ( ) => rootRoute ,
27
30
} as any )
28
31
32
+ const ProjectsIndexRoute = ProjectsIndexImport . update ( {
33
+ path : '/projects/' ,
34
+ getParentRoute : ( ) => rootRoute ,
35
+ } as any )
36
+
37
+ const UserSetRoute = UserSetImport . update ( {
38
+ path : '/user/set' ,
39
+ getParentRoute : ( ) => rootRoute ,
40
+ } as any )
41
+
42
+ const ProjectsProjectIdIndexRoute = ProjectsProjectIdIndexImport . update ( {
43
+ path : '/projects/$projectId/' ,
44
+ getParentRoute : ( ) => rootRoute ,
45
+ } as any )
46
+
29
47
// Populate the FileRoutesByPath interface
30
48
31
49
declare module '@tanstack/react-router' {
@@ -34,15 +52,33 @@ declare module '@tanstack/react-router' {
34
52
preLoaderRoute : typeof IndexImport
35
53
parentRoute : typeof rootRoute
36
54
}
37
- '/projects' : {
38
- preLoaderRoute : typeof ProjectsImport
55
+ '/_hasUserGuard' : {
56
+ preLoaderRoute : typeof HasUserGuardImport
57
+ parentRoute : typeof rootRoute
58
+ }
59
+ '/user/set' : {
60
+ preLoaderRoute : typeof UserSetImport
61
+ parentRoute : typeof rootRoute
62
+ }
63
+ '/projects/' : {
64
+ preLoaderRoute : typeof ProjectsIndexImport
65
+ parentRoute : typeof rootRoute
66
+ }
67
+ '/projects/$projectId/' : {
68
+ preLoaderRoute : typeof ProjectsProjectIdIndexImport
39
69
parentRoute : typeof rootRoute
40
70
}
41
71
}
42
72
}
43
73
44
74
// Create and export the route tree
45
75
46
- export const routeTree = rootRoute . addChildren ( [ IndexRoute , ProjectsRoute ] )
76
+ export const routeTree = rootRoute . addChildren ( [
77
+ IndexRoute ,
78
+ HasUserGuardRoute ,
79
+ UserSetRoute ,
80
+ ProjectsIndexRoute ,
81
+ ProjectsProjectIdIndexRoute ,
82
+ ] )
47
83
48
84
/* prettier-ignore-end */
0 commit comments