@@ -15,14 +15,17 @@ import { Route as SignupImport } from './routes/signup'
1515import { Route as ResetPasswordImport } from './routes/reset-password'
1616import { Route as RecoverPasswordImport } from './routes/recover-password'
1717import { Route as LoginImport } from './routes/login'
18- import { Route as LayoutImport } from './routes/_layout'
19- import { Route as LayoutIndexImport } from './routes/_layout/index'
20- import { Route as LayoutSettingsImport } from './routes/_layout/settings'
21- import { Route as LayoutPathsImport } from './routes/_layout/paths'
22- import { Route as LayoutItemsImport } from './routes/_layout/items'
23- import { Route as LayoutAdminImport } from './routes/_layout/admin'
24- import { Route as PathsCreateIndexImport } from './routes/paths/create/index'
25- import { Route as PathsPathIdIndexImport } from './routes/paths/$pathId/index'
18+ import { Route as AuthenticatedImport } from './routes/_authenticated'
19+ import { Route as AuthenticatedIndexImport } from './routes/_authenticated/index'
20+ import { Route as AuthenticatedSettingsImport } from './routes/_authenticated/settings'
21+ import { Route as AuthenticatedItemsImport } from './routes/_authenticated/items'
22+ import { Route as AuthenticatedAdminImport } from './routes/_authenticated/admin'
23+ import { Route as AuthenticatedPathsIndexImport } from './routes/_authenticated/paths/index'
24+ import { Route as AuthenticatedLearnIndexImport } from './routes/_authenticated/learn/index'
25+ import { Route as AuthenticatedPathsCreateImport } from './routes/_authenticated/paths/create'
26+ import { Route as AuthenticatedPathsPathIdImport } from './routes/_authenticated/paths/$pathId'
27+ import { Route as AuthenticatedLearnChatImport } from './routes/_authenticated/learn/chat'
28+ import { Route as AuthenticatedLearnPathIdImport } from './routes/_authenticated/learn/$pathId'
2629
2730// Create/Update Routes
2831
@@ -46,52 +49,67 @@ const LoginRoute = LoginImport.update({
4649 getParentRoute : ( ) => rootRoute ,
4750} as any )
4851
49- const LayoutRoute = LayoutImport . update ( {
50- id : '/_layout ' ,
52+ const AuthenticatedRoute = AuthenticatedImport . update ( {
53+ id : '/_authenticated ' ,
5154 getParentRoute : ( ) => rootRoute ,
5255} as any )
5356
54- const LayoutIndexRoute = LayoutIndexImport . update ( {
57+ const AuthenticatedIndexRoute = AuthenticatedIndexImport . update ( {
5558 path : '/' ,
56- getParentRoute : ( ) => LayoutRoute ,
59+ getParentRoute : ( ) => AuthenticatedRoute ,
5760} as any )
5861
59- const LayoutSettingsRoute = LayoutSettingsImport . update ( {
62+ const AuthenticatedSettingsRoute = AuthenticatedSettingsImport . update ( {
6063 path : '/settings' ,
61- getParentRoute : ( ) => LayoutRoute ,
64+ getParentRoute : ( ) => AuthenticatedRoute ,
6265} as any )
6366
64- const LayoutPathsRoute = LayoutPathsImport . update ( {
65- path : '/paths' ,
66- getParentRoute : ( ) => LayoutRoute ,
67- } as any )
68-
69- const LayoutItemsRoute = LayoutItemsImport . update ( {
67+ const AuthenticatedItemsRoute = AuthenticatedItemsImport . update ( {
7068 path : '/items' ,
71- getParentRoute : ( ) => LayoutRoute ,
69+ getParentRoute : ( ) => AuthenticatedRoute ,
7270} as any )
7371
74- const LayoutAdminRoute = LayoutAdminImport . update ( {
72+ const AuthenticatedAdminRoute = AuthenticatedAdminImport . update ( {
7573 path : '/admin' ,
76- getParentRoute : ( ) => LayoutRoute ,
74+ getParentRoute : ( ) => AuthenticatedRoute ,
7775} as any )
7876
79- const PathsCreateIndexRoute = PathsCreateIndexImport . update ( {
80- path : '/paths/create/ ' ,
81- getParentRoute : ( ) => rootRoute ,
77+ const AuthenticatedPathsIndexRoute = AuthenticatedPathsIndexImport . update ( {
78+ path : '/paths/' ,
79+ getParentRoute : ( ) => AuthenticatedRoute ,
8280} as any )
8381
84- const PathsPathIdIndexRoute = PathsPathIdIndexImport . update ( {
85- path : '/paths/$pathId/' ,
86- getParentRoute : ( ) => rootRoute ,
82+ const AuthenticatedLearnIndexRoute = AuthenticatedLearnIndexImport . update ( {
83+ path : '/learn/' ,
84+ getParentRoute : ( ) => AuthenticatedRoute ,
85+ } as any )
86+
87+ const AuthenticatedPathsCreateRoute = AuthenticatedPathsCreateImport . update ( {
88+ path : '/paths/create' ,
89+ getParentRoute : ( ) => AuthenticatedRoute ,
90+ } as any )
91+
92+ const AuthenticatedPathsPathIdRoute = AuthenticatedPathsPathIdImport . update ( {
93+ path : '/paths/$pathId' ,
94+ getParentRoute : ( ) => AuthenticatedRoute ,
95+ } as any )
96+
97+ const AuthenticatedLearnChatRoute = AuthenticatedLearnChatImport . update ( {
98+ path : '/learn/chat' ,
99+ getParentRoute : ( ) => AuthenticatedRoute ,
100+ } as any )
101+
102+ const AuthenticatedLearnPathIdRoute = AuthenticatedLearnPathIdImport . update ( {
103+ path : '/learn/$pathId' ,
104+ getParentRoute : ( ) => AuthenticatedRoute ,
87105} as any )
88106
89107// Populate the FileRoutesByPath interface
90108
91109declare module '@tanstack/react-router' {
92110 interface FileRoutesByPath {
93- '/_layout ' : {
94- preLoaderRoute : typeof LayoutImport
111+ '/_authenticated ' : {
112+ preLoaderRoute : typeof AuthenticatedImport
95113 parentRoute : typeof rootRoute
96114 }
97115 '/login' : {
@@ -110,53 +128,68 @@ declare module '@tanstack/react-router' {
110128 preLoaderRoute : typeof SignupImport
111129 parentRoute : typeof rootRoute
112130 }
113- '/_layout /admin' : {
114- preLoaderRoute : typeof LayoutAdminImport
115- parentRoute : typeof LayoutImport
131+ '/_authenticated /admin' : {
132+ preLoaderRoute : typeof AuthenticatedAdminImport
133+ parentRoute : typeof AuthenticatedImport
116134 }
117- '/_layout /items' : {
118- preLoaderRoute : typeof LayoutItemsImport
119- parentRoute : typeof LayoutImport
135+ '/_authenticated /items' : {
136+ preLoaderRoute : typeof AuthenticatedItemsImport
137+ parentRoute : typeof AuthenticatedImport
120138 }
121- '/_layout/paths ' : {
122- preLoaderRoute : typeof LayoutPathsImport
123- parentRoute : typeof LayoutImport
139+ '/_authenticated/settings ' : {
140+ preLoaderRoute : typeof AuthenticatedSettingsImport
141+ parentRoute : typeof AuthenticatedImport
124142 }
125- '/_layout/settings ' : {
126- preLoaderRoute : typeof LayoutSettingsImport
127- parentRoute : typeof LayoutImport
143+ '/_authenticated/ ' : {
144+ preLoaderRoute : typeof AuthenticatedIndexImport
145+ parentRoute : typeof AuthenticatedImport
128146 }
129- '/_layout/ ' : {
130- preLoaderRoute : typeof LayoutIndexImport
131- parentRoute : typeof LayoutImport
147+ '/_authenticated/learn/$pathId ' : {
148+ preLoaderRoute : typeof AuthenticatedLearnPathIdImport
149+ parentRoute : typeof AuthenticatedImport
132150 }
133- '/paths/$pathId/ ' : {
134- preLoaderRoute : typeof PathsPathIdIndexImport
135- parentRoute : typeof rootRoute
151+ '/_authenticated/learn/chat ' : {
152+ preLoaderRoute : typeof AuthenticatedLearnChatImport
153+ parentRoute : typeof AuthenticatedImport
136154 }
137- '/paths/create/' : {
138- preLoaderRoute : typeof PathsCreateIndexImport
139- parentRoute : typeof rootRoute
155+ '/_authenticated/paths/$pathId' : {
156+ preLoaderRoute : typeof AuthenticatedPathsPathIdImport
157+ parentRoute : typeof AuthenticatedImport
158+ }
159+ '/_authenticated/paths/create' : {
160+ preLoaderRoute : typeof AuthenticatedPathsCreateImport
161+ parentRoute : typeof AuthenticatedImport
162+ }
163+ '/_authenticated/learn/' : {
164+ preLoaderRoute : typeof AuthenticatedLearnIndexImport
165+ parentRoute : typeof AuthenticatedImport
166+ }
167+ '/_authenticated/paths/' : {
168+ preLoaderRoute : typeof AuthenticatedPathsIndexImport
169+ parentRoute : typeof AuthenticatedImport
140170 }
141171 }
142172}
143173
144174// Create and export the route tree
145175
146176export const routeTree = rootRoute . addChildren ( [
147- LayoutRoute . addChildren ( [
148- LayoutAdminRoute ,
149- LayoutItemsRoute ,
150- LayoutPathsRoute ,
151- LayoutSettingsRoute ,
152- LayoutIndexRoute ,
177+ AuthenticatedRoute . addChildren ( [
178+ AuthenticatedAdminRoute ,
179+ AuthenticatedItemsRoute ,
180+ AuthenticatedSettingsRoute ,
181+ AuthenticatedIndexRoute ,
182+ AuthenticatedLearnPathIdRoute ,
183+ AuthenticatedLearnChatRoute ,
184+ AuthenticatedPathsPathIdRoute ,
185+ AuthenticatedPathsCreateRoute ,
186+ AuthenticatedLearnIndexRoute ,
187+ AuthenticatedPathsIndexRoute ,
153188 ] ) ,
154189 LoginRoute ,
155190 RecoverPasswordRoute ,
156191 ResetPasswordRoute ,
157192 SignupRoute ,
158- PathsPathIdIndexRoute ,
159- PathsCreateIndexRoute ,
160193] )
161194
162195/* prettier-ignore-end */
0 commit comments