-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from hmerritt/feat/tanstack-router
Feat / tanstack router
- Loading branch information
Showing
25 changed files
with
505 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// This file is auto-generated by TanStack Router | ||
|
||
import { createFileRoute } from '@tanstack/react-router' | ||
|
||
// Import Routes | ||
|
||
import { Route as rootRoute } from './view/routes/__root' | ||
import { Route as IndexImport } from './view/routes/index' | ||
|
||
// Create Virtual Routes | ||
|
||
const UserLazyImport = createFileRoute('/user')() | ||
const UserUserIdLazyImport = createFileRoute('/user/$userId')() | ||
|
||
// Create/Update Routes | ||
|
||
const UserLazyRoute = UserLazyImport.update({ | ||
path: '/user', | ||
getParentRoute: () => rootRoute, | ||
} as any).lazy(() => import('./view/routes/user.lazy').then((d) => d.Route)) | ||
|
||
const IndexRoute = IndexImport.update({ | ||
path: '/', | ||
getParentRoute: () => rootRoute, | ||
} as any) | ||
|
||
const UserUserIdLazyRoute = UserUserIdLazyImport.update({ | ||
path: '/$userId', | ||
getParentRoute: () => UserLazyRoute, | ||
} as any).lazy(() => | ||
import('./view/routes/user.$userId.lazy').then((d) => d.Route), | ||
) | ||
|
||
// Populate the FileRoutesByPath interface | ||
|
||
declare module '@tanstack/react-router' { | ||
interface FileRoutesByPath { | ||
'/': { | ||
preLoaderRoute: typeof IndexImport | ||
parentRoute: typeof rootRoute | ||
} | ||
'/user': { | ||
preLoaderRoute: typeof UserLazyImport | ||
parentRoute: typeof rootRoute | ||
} | ||
'/user/$userId': { | ||
preLoaderRoute: typeof UserUserIdLazyImport | ||
parentRoute: typeof UserLazyImport | ||
} | ||
} | ||
} | ||
|
||
// Create and export the route tree | ||
|
||
export const routeTree = rootRoute.addChildren([ | ||
IndexRoute, | ||
UserLazyRoute.addChildren([UserUserIdLazyRoute]), | ||
]) |
Oops, something went wrong.