|
8 | 8 | // You should NOT make any changes in this file as it will be overwritten.
|
9 | 9 | // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
10 | 10 |
|
11 |
| -// Import Routes |
12 |
| - |
13 |
| -import { Route as rootRoute } from './routes/__root' |
14 |
| -import { Route as DashboardImport } from './routes/dashboard' |
15 |
| -import { Route as IndexImport } from './routes/index' |
16 |
| -import { Route as DashboardIndexImport } from './routes/dashboard.index' |
17 |
| -import { Route as DashboardPostsImport } from './routes/dashboard.posts' |
18 |
| -import { Route as DashboardPostsIndexImport } from './routes/dashboard.posts.index' |
19 |
| -import { Route as DashboardPostsPostIdImport } from './routes/dashboard.posts.$postId' |
20 |
| - |
21 |
| -// Create/Update Routes |
22 |
| - |
23 |
| -const DashboardRoute = DashboardImport.update({ |
| 11 | +import { Route as rootRouteImport } from './routes/__root' |
| 12 | +import { Route as DashboardRouteImport } from './routes/dashboard' |
| 13 | +import { Route as IndexRouteImport } from './routes/index' |
| 14 | +import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' |
| 15 | +import { Route as DashboardPostsRouteImport } from './routes/dashboard.posts' |
| 16 | +import { Route as DashboardPostsIndexRouteImport } from './routes/dashboard.posts.index' |
| 17 | +import { Route as DashboardPostsPostIdRouteImport } from './routes/dashboard.posts.$postId' |
| 18 | + |
| 19 | +const DashboardRoute = DashboardRouteImport.update({ |
24 | 20 | id: '/dashboard',
|
25 | 21 | path: '/dashboard',
|
26 |
| - getParentRoute: () => rootRoute, |
| 22 | + getParentRoute: () => rootRouteImport, |
27 | 23 | } as any)
|
28 |
| - |
29 |
| -const IndexRoute = IndexImport.update({ |
| 24 | +const IndexRoute = IndexRouteImport.update({ |
30 | 25 | id: '/',
|
31 | 26 | path: '/',
|
32 |
| - getParentRoute: () => rootRoute, |
| 27 | + getParentRoute: () => rootRouteImport, |
33 | 28 | } as any)
|
34 |
| - |
35 |
| -const DashboardIndexRoute = DashboardIndexImport.update({ |
| 29 | +const DashboardIndexRoute = DashboardIndexRouteImport.update({ |
36 | 30 | id: '/',
|
37 | 31 | path: '/',
|
38 | 32 | getParentRoute: () => DashboardRoute,
|
39 | 33 | } as any)
|
40 |
| - |
41 |
| -const DashboardPostsRoute = DashboardPostsImport.update({ |
| 34 | +const DashboardPostsRoute = DashboardPostsRouteImport.update({ |
42 | 35 | id: '/posts',
|
43 | 36 | path: '/posts',
|
44 | 37 | getParentRoute: () => DashboardRoute,
|
45 | 38 | } as any)
|
46 |
| - |
47 |
| -const DashboardPostsIndexRoute = DashboardPostsIndexImport.update({ |
| 39 | +const DashboardPostsIndexRoute = DashboardPostsIndexRouteImport.update({ |
48 | 40 | id: '/',
|
49 | 41 | path: '/',
|
50 | 42 | getParentRoute: () => DashboardPostsRoute,
|
51 | 43 | } as any)
|
52 |
| - |
53 |
| -const DashboardPostsPostIdRoute = DashboardPostsPostIdImport.update({ |
| 44 | +const DashboardPostsPostIdRoute = DashboardPostsPostIdRouteImport.update({ |
54 | 45 | id: '/$postId',
|
55 | 46 | path: '/$postId',
|
56 | 47 | getParentRoute: () => DashboardPostsRoute,
|
57 | 48 | } as any)
|
58 | 49 |
|
59 |
| -// Populate the FileRoutesByPath interface |
| 50 | +export interface FileRoutesByFullPath { |
| 51 | + '/': typeof IndexRoute |
| 52 | + '/dashboard': typeof DashboardRouteWithChildren |
| 53 | + '/dashboard/posts': typeof DashboardPostsRouteWithChildren |
| 54 | + '/dashboard/': typeof DashboardIndexRoute |
| 55 | + '/dashboard/posts/$postId': typeof DashboardPostsPostIdRoute |
| 56 | + '/dashboard/posts/': typeof DashboardPostsIndexRoute |
| 57 | +} |
| 58 | +export interface FileRoutesByTo { |
| 59 | + '/': typeof IndexRoute |
| 60 | + '/dashboard': typeof DashboardIndexRoute |
| 61 | + '/dashboard/posts/$postId': typeof DashboardPostsPostIdRoute |
| 62 | + '/dashboard/posts': typeof DashboardPostsIndexRoute |
| 63 | +} |
| 64 | +export interface FileRoutesById { |
| 65 | + __root__: typeof rootRouteImport |
| 66 | + '/': typeof IndexRoute |
| 67 | + '/dashboard': typeof DashboardRouteWithChildren |
| 68 | + '/dashboard/posts': typeof DashboardPostsRouteWithChildren |
| 69 | + '/dashboard/': typeof DashboardIndexRoute |
| 70 | + '/dashboard/posts/$postId': typeof DashboardPostsPostIdRoute |
| 71 | + '/dashboard/posts/': typeof DashboardPostsIndexRoute |
| 72 | +} |
| 73 | +export interface FileRouteTypes { |
| 74 | + fileRoutesByFullPath: FileRoutesByFullPath |
| 75 | + fullPaths: |
| 76 | + | '/' |
| 77 | + | '/dashboard' |
| 78 | + | '/dashboard/posts' |
| 79 | + | '/dashboard/' |
| 80 | + | '/dashboard/posts/$postId' |
| 81 | + | '/dashboard/posts/' |
| 82 | + fileRoutesByTo: FileRoutesByTo |
| 83 | + to: '/' | '/dashboard' | '/dashboard/posts/$postId' | '/dashboard/posts' |
| 84 | + id: |
| 85 | + | '__root__' |
| 86 | + | '/' |
| 87 | + | '/dashboard' |
| 88 | + | '/dashboard/posts' |
| 89 | + | '/dashboard/' |
| 90 | + | '/dashboard/posts/$postId' |
| 91 | + | '/dashboard/posts/' |
| 92 | + fileRoutesById: FileRoutesById |
| 93 | +} |
| 94 | +export interface RootRouteChildren { |
| 95 | + IndexRoute: typeof IndexRoute |
| 96 | + DashboardRoute: typeof DashboardRouteWithChildren |
| 97 | +} |
60 | 98 |
|
61 | 99 | declare module '@tanstack/react-router' {
|
62 | 100 | interface FileRoutesByPath {
|
| 101 | + '/dashboard': { |
| 102 | + id: '/dashboard' |
| 103 | + path: '/dashboard' |
| 104 | + fullPath: '/dashboard' |
| 105 | + preLoaderRoute: typeof DashboardRouteImport |
| 106 | + parentRoute: typeof rootRouteImport |
| 107 | + } |
63 | 108 | '/': {
|
64 | 109 | id: '/'
|
65 | 110 | path: '/'
|
66 | 111 | fullPath: '/'
|
67 |
| - preLoaderRoute: typeof IndexImport |
68 |
| - parentRoute: typeof rootRoute |
| 112 | + preLoaderRoute: typeof IndexRouteImport |
| 113 | + parentRoute: typeof rootRouteImport |
69 | 114 | }
|
70 |
| - '/dashboard': { |
71 |
| - id: '/dashboard' |
72 |
| - path: '/dashboard' |
73 |
| - fullPath: '/dashboard' |
74 |
| - preLoaderRoute: typeof DashboardImport |
75 |
| - parentRoute: typeof rootRoute |
| 115 | + '/dashboard/': { |
| 116 | + id: '/dashboard/' |
| 117 | + path: '/' |
| 118 | + fullPath: '/dashboard/' |
| 119 | + preLoaderRoute: typeof DashboardIndexRouteImport |
| 120 | + parentRoute: typeof DashboardRoute |
76 | 121 | }
|
77 | 122 | '/dashboard/posts': {
|
78 | 123 | id: '/dashboard/posts'
|
79 | 124 | path: '/posts'
|
80 | 125 | fullPath: '/dashboard/posts'
|
81 |
| - preLoaderRoute: typeof DashboardPostsImport |
82 |
| - parentRoute: typeof DashboardImport |
| 126 | + preLoaderRoute: typeof DashboardPostsRouteImport |
| 127 | + parentRoute: typeof DashboardRoute |
83 | 128 | }
|
84 |
| - '/dashboard/': { |
85 |
| - id: '/dashboard/' |
| 129 | + '/dashboard/posts/': { |
| 130 | + id: '/dashboard/posts/' |
86 | 131 | path: '/'
|
87 |
| - fullPath: '/dashboard/' |
88 |
| - preLoaderRoute: typeof DashboardIndexImport |
89 |
| - parentRoute: typeof DashboardImport |
| 132 | + fullPath: '/dashboard/posts/' |
| 133 | + preLoaderRoute: typeof DashboardPostsIndexRouteImport |
| 134 | + parentRoute: typeof DashboardPostsRoute |
90 | 135 | }
|
91 | 136 | '/dashboard/posts/$postId': {
|
92 | 137 | id: '/dashboard/posts/$postId'
|
93 | 138 | path: '/$postId'
|
94 | 139 | fullPath: '/dashboard/posts/$postId'
|
95 |
| - preLoaderRoute: typeof DashboardPostsPostIdImport |
96 |
| - parentRoute: typeof DashboardPostsImport |
97 |
| - } |
98 |
| - '/dashboard/posts/': { |
99 |
| - id: '/dashboard/posts/' |
100 |
| - path: '/' |
101 |
| - fullPath: '/dashboard/posts/' |
102 |
| - preLoaderRoute: typeof DashboardPostsIndexImport |
103 |
| - parentRoute: typeof DashboardPostsImport |
| 140 | + preLoaderRoute: typeof DashboardPostsPostIdRouteImport |
| 141 | + parentRoute: typeof DashboardPostsRoute |
104 | 142 | }
|
105 | 143 | }
|
106 | 144 | }
|
107 | 145 |
|
108 |
| -// Create and export the route tree |
109 |
| - |
110 | 146 | interface DashboardPostsRouteChildren {
|
111 | 147 | DashboardPostsPostIdRoute: typeof DashboardPostsPostIdRoute
|
112 | 148 | DashboardPostsIndexRoute: typeof DashboardPostsIndexRoute
|
@@ -135,108 +171,10 @@ const DashboardRouteWithChildren = DashboardRoute._addFileChildren(
|
135 | 171 | DashboardRouteChildren,
|
136 | 172 | )
|
137 | 173 |
|
138 |
| -export interface FileRoutesByFullPath { |
139 |
| - '/': typeof IndexRoute |
140 |
| - '/dashboard': typeof DashboardRouteWithChildren |
141 |
| - '/dashboard/posts': typeof DashboardPostsRouteWithChildren |
142 |
| - '/dashboard/': typeof DashboardIndexRoute |
143 |
| - '/dashboard/posts/$postId': typeof DashboardPostsPostIdRoute |
144 |
| - '/dashboard/posts/': typeof DashboardPostsIndexRoute |
145 |
| -} |
146 |
| - |
147 |
| -export interface FileRoutesByTo { |
148 |
| - '/': typeof IndexRoute |
149 |
| - '/dashboard': typeof DashboardIndexRoute |
150 |
| - '/dashboard/posts/$postId': typeof DashboardPostsPostIdRoute |
151 |
| - '/dashboard/posts': typeof DashboardPostsIndexRoute |
152 |
| -} |
153 |
| - |
154 |
| -export interface FileRoutesById { |
155 |
| - __root__: typeof rootRoute |
156 |
| - '/': typeof IndexRoute |
157 |
| - '/dashboard': typeof DashboardRouteWithChildren |
158 |
| - '/dashboard/posts': typeof DashboardPostsRouteWithChildren |
159 |
| - '/dashboard/': typeof DashboardIndexRoute |
160 |
| - '/dashboard/posts/$postId': typeof DashboardPostsPostIdRoute |
161 |
| - '/dashboard/posts/': typeof DashboardPostsIndexRoute |
162 |
| -} |
163 |
| - |
164 |
| -export interface FileRouteTypes { |
165 |
| - fileRoutesByFullPath: FileRoutesByFullPath |
166 |
| - fullPaths: |
167 |
| - | '/' |
168 |
| - | '/dashboard' |
169 |
| - | '/dashboard/posts' |
170 |
| - | '/dashboard/' |
171 |
| - | '/dashboard/posts/$postId' |
172 |
| - | '/dashboard/posts/' |
173 |
| - fileRoutesByTo: FileRoutesByTo |
174 |
| - to: '/' | '/dashboard' | '/dashboard/posts/$postId' | '/dashboard/posts' |
175 |
| - id: |
176 |
| - | '__root__' |
177 |
| - | '/' |
178 |
| - | '/dashboard' |
179 |
| - | '/dashboard/posts' |
180 |
| - | '/dashboard/' |
181 |
| - | '/dashboard/posts/$postId' |
182 |
| - | '/dashboard/posts/' |
183 |
| - fileRoutesById: FileRoutesById |
184 |
| -} |
185 |
| - |
186 |
| -export interface RootRouteChildren { |
187 |
| - IndexRoute: typeof IndexRoute |
188 |
| - DashboardRoute: typeof DashboardRouteWithChildren |
189 |
| -} |
190 |
| - |
191 | 174 | const rootRouteChildren: RootRouteChildren = {
|
192 | 175 | IndexRoute: IndexRoute,
|
193 | 176 | DashboardRoute: DashboardRouteWithChildren,
|
194 | 177 | }
|
195 |
| - |
196 |
| -export const routeTree = rootRoute |
| 178 | +export const routeTree = rootRouteImport |
197 | 179 | ._addFileChildren(rootRouteChildren)
|
198 | 180 | ._addFileTypes<FileRouteTypes>()
|
199 |
| - |
200 |
| -/* ROUTE_MANIFEST_START |
201 |
| -{ |
202 |
| - "routes": { |
203 |
| - "__root__": { |
204 |
| - "filePath": "__root.tsx", |
205 |
| - "children": [ |
206 |
| - "/", |
207 |
| - "/dashboard" |
208 |
| - ] |
209 |
| - }, |
210 |
| - "/": { |
211 |
| - "filePath": "index.tsx" |
212 |
| - }, |
213 |
| - "/dashboard": { |
214 |
| - "filePath": "dashboard.tsx", |
215 |
| - "children": [ |
216 |
| - "/dashboard/posts", |
217 |
| - "/dashboard/" |
218 |
| - ] |
219 |
| - }, |
220 |
| - "/dashboard/posts": { |
221 |
| - "filePath": "dashboard.posts.tsx", |
222 |
| - "parent": "/dashboard", |
223 |
| - "children": [ |
224 |
| - "/dashboard/posts/$postId", |
225 |
| - "/dashboard/posts/" |
226 |
| - ] |
227 |
| - }, |
228 |
| - "/dashboard/": { |
229 |
| - "filePath": "dashboard.index.tsx", |
230 |
| - "parent": "/dashboard" |
231 |
| - }, |
232 |
| - "/dashboard/posts/$postId": { |
233 |
| - "filePath": "dashboard.posts.$postId.tsx", |
234 |
| - "parent": "/dashboard/posts" |
235 |
| - }, |
236 |
| - "/dashboard/posts/": { |
237 |
| - "filePath": "dashboard.posts.index.tsx", |
238 |
| - "parent": "/dashboard/posts" |
239 |
| - } |
240 |
| - } |
241 |
| -} |
242 |
| -ROUTE_MANIFEST_END */ |
0 commit comments