1111// Import Routes
1212
1313import { Route as rootRoute } from './routes/__root'
14+ import { Route as WorkspaceIdImport } from './routes/$workspaceId'
1415import { Route as IndexImport } from './routes/index'
1516
1617// Create/Update Routes
1718
19+ const WorkspaceIdRoute = WorkspaceIdImport . update ( {
20+ id : '/$workspaceId' ,
21+ path : '/$workspaceId' ,
22+ getParentRoute : ( ) => rootRoute ,
23+ } as any )
24+
1825const IndexRoute = IndexImport . update ( {
1926 id : '/' ,
2027 path : '/' ,
@@ -32,39 +39,51 @@ declare module '@tanstack/react-router' {
3239 preLoaderRoute : typeof IndexImport
3340 parentRoute : typeof rootRoute
3441 }
42+ '/$workspaceId' : {
43+ id : '/$workspaceId'
44+ path : '/$workspaceId'
45+ fullPath : '/$workspaceId'
46+ preLoaderRoute : typeof WorkspaceIdImport
47+ parentRoute : typeof rootRoute
48+ }
3549 }
3650}
3751
3852// Create and export the route tree
3953
4054export interface FileRoutesByFullPath {
4155 '/' : typeof IndexRoute
56+ '/$workspaceId' : typeof WorkspaceIdRoute
4257}
4358
4459export interface FileRoutesByTo {
4560 '/' : typeof IndexRoute
61+ '/$workspaceId' : typeof WorkspaceIdRoute
4662}
4763
4864export interface FileRoutesById {
4965 __root__ : typeof rootRoute
5066 '/' : typeof IndexRoute
67+ '/$workspaceId' : typeof WorkspaceIdRoute
5168}
5269
5370export interface FileRouteTypes {
5471 fileRoutesByFullPath : FileRoutesByFullPath
55- fullPaths : '/'
72+ fullPaths : '/' | '/$workspaceId'
5673 fileRoutesByTo : FileRoutesByTo
57- to : '/'
58- id : '__root__' | '/'
74+ to : '/' | '/$workspaceId'
75+ id : '__root__' | '/' | '/$workspaceId'
5976 fileRoutesById : FileRoutesById
6077}
6178
6279export interface RootRouteChildren {
6380 IndexRoute : typeof IndexRoute
81+ WorkspaceIdRoute : typeof WorkspaceIdRoute
6482}
6583
6684const rootRouteChildren : RootRouteChildren = {
6785 IndexRoute : IndexRoute ,
86+ WorkspaceIdRoute : WorkspaceIdRoute ,
6887}
6988
7089export const routeTree = rootRoute
@@ -77,11 +96,15 @@ export const routeTree = rootRoute
7796 "__root__": {
7897 "filePath": "__root.tsx",
7998 "children": [
80- "/"
99+ "/",
100+ "/$workspaceId"
81101 ]
82102 },
83103 "/": {
84104 "filePath": "index.tsx"
105+ },
106+ "/$workspaceId": {
107+ "filePath": "$workspaceId.tsx"
85108 }
86109 }
87110}
0 commit comments