implemented identity, updated session, added 'workings' list
added paginated querying, added 'common'
This commit is contained in:
parent
027deba422
commit
6ada519e06
36 changed files with 1422 additions and 279 deletions
|
|
@ -15,8 +15,11 @@ import { createFileRoute } from '@tanstack/react-router'
|
|||
import { Route as rootRoute } from './pages/__root'
|
||||
import { Route as RegisterImport } from './pages/register'
|
||||
import { Route as LoginImport } from './pages/login'
|
||||
import { Route as ExampleImport } from './pages/example'
|
||||
import { Route as EditorImport } from './pages/editor'
|
||||
import { Route as AboutImport } from './pages/about'
|
||||
import { Route as IndexImport } from './pages/index'
|
||||
import { Route as ProfileUsernameImport } from './pages/profile/$username'
|
||||
|
||||
// Create Virtual Routes
|
||||
|
||||
|
|
@ -42,6 +45,18 @@ const LoginRoute = LoginImport.update({
|
|||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const ExampleRoute = ExampleImport.update({
|
||||
id: '/example',
|
||||
path: '/example',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const EditorRoute = EditorImport.update({
|
||||
id: '/editor',
|
||||
path: '/editor',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const AboutRoute = AboutImport.update({
|
||||
id: '/about',
|
||||
path: '/about',
|
||||
|
|
@ -54,6 +69,12 @@ const IndexRoute = IndexImport.update({
|
|||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const ProfileUsernameRoute = ProfileUsernameImport.update({
|
||||
id: '/profile/$username',
|
||||
path: '/profile/$username',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
// Populate the FileRoutesByPath interface
|
||||
|
||||
declare module '@tanstack/react-router' {
|
||||
|
|
@ -72,6 +93,20 @@ declare module '@tanstack/react-router' {
|
|||
preLoaderRoute: typeof AboutImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/editor': {
|
||||
id: '/editor'
|
||||
path: '/editor'
|
||||
fullPath: '/editor'
|
||||
preLoaderRoute: typeof EditorImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/example': {
|
||||
id: '/example'
|
||||
path: '/example'
|
||||
fullPath: '/example'
|
||||
preLoaderRoute: typeof ExampleImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/login': {
|
||||
id: '/login'
|
||||
path: '/login'
|
||||
|
|
@ -93,6 +128,13 @@ declare module '@tanstack/react-router' {
|
|||
preLoaderRoute: typeof BookLazyImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/profile/$username': {
|
||||
id: '/profile/$username'
|
||||
path: '/profile/$username'
|
||||
fullPath: '/profile/$username'
|
||||
preLoaderRoute: typeof ProfileUsernameImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,51 +143,91 @@ declare module '@tanstack/react-router' {
|
|||
export interface FileRoutesByFullPath {
|
||||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/editor': typeof EditorRoute
|
||||
'/example': typeof ExampleRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/register': typeof RegisterRoute
|
||||
'/book': typeof BookLazyRoute
|
||||
'/profile/$username': typeof ProfileUsernameRoute
|
||||
}
|
||||
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/editor': typeof EditorRoute
|
||||
'/example': typeof ExampleRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/register': typeof RegisterRoute
|
||||
'/book': typeof BookLazyRoute
|
||||
'/profile/$username': typeof ProfileUsernameRoute
|
||||
}
|
||||
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRoute
|
||||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/editor': typeof EditorRoute
|
||||
'/example': typeof ExampleRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/register': typeof RegisterRoute
|
||||
'/book': typeof BookLazyRoute
|
||||
'/profile/$username': typeof ProfileUsernameRoute
|
||||
}
|
||||
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
fullPaths: '/' | '/about' | '/login' | '/register' | '/book'
|
||||
fullPaths:
|
||||
| '/'
|
||||
| '/about'
|
||||
| '/editor'
|
||||
| '/example'
|
||||
| '/login'
|
||||
| '/register'
|
||||
| '/book'
|
||||
| '/profile/$username'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to: '/' | '/about' | '/login' | '/register' | '/book'
|
||||
id: '__root__' | '/' | '/about' | '/login' | '/register' | '/book'
|
||||
to:
|
||||
| '/'
|
||||
| '/about'
|
||||
| '/editor'
|
||||
| '/example'
|
||||
| '/login'
|
||||
| '/register'
|
||||
| '/book'
|
||||
| '/profile/$username'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/'
|
||||
| '/about'
|
||||
| '/editor'
|
||||
| '/example'
|
||||
| '/login'
|
||||
| '/register'
|
||||
| '/book'
|
||||
| '/profile/$username'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
|
||||
export interface RootRouteChildren {
|
||||
IndexRoute: typeof IndexRoute
|
||||
AboutRoute: typeof AboutRoute
|
||||
EditorRoute: typeof EditorRoute
|
||||
ExampleRoute: typeof ExampleRoute
|
||||
LoginRoute: typeof LoginRoute
|
||||
RegisterRoute: typeof RegisterRoute
|
||||
BookLazyRoute: typeof BookLazyRoute
|
||||
ProfileUsernameRoute: typeof ProfileUsernameRoute
|
||||
}
|
||||
|
||||
const rootRouteChildren: RootRouteChildren = {
|
||||
IndexRoute: IndexRoute,
|
||||
AboutRoute: AboutRoute,
|
||||
EditorRoute: EditorRoute,
|
||||
ExampleRoute: ExampleRoute,
|
||||
LoginRoute: LoginRoute,
|
||||
RegisterRoute: RegisterRoute,
|
||||
BookLazyRoute: BookLazyRoute,
|
||||
ProfileUsernameRoute: ProfileUsernameRoute,
|
||||
}
|
||||
|
||||
export const routeTree = rootRoute
|
||||
|
|
@ -160,9 +242,12 @@ export const routeTree = rootRoute
|
|||
"children": [
|
||||
"/",
|
||||
"/about",
|
||||
"/editor",
|
||||
"/example",
|
||||
"/login",
|
||||
"/register",
|
||||
"/book"
|
||||
"/book",
|
||||
"/profile/$username"
|
||||
]
|
||||
},
|
||||
"/": {
|
||||
|
|
@ -171,6 +256,12 @@ export const routeTree = rootRoute
|
|||
"/about": {
|
||||
"filePath": "about.tsx"
|
||||
},
|
||||
"/editor": {
|
||||
"filePath": "editor.tsx"
|
||||
},
|
||||
"/example": {
|
||||
"filePath": "example.tsx"
|
||||
},
|
||||
"/login": {
|
||||
"filePath": "login.tsx"
|
||||
},
|
||||
|
|
@ -179,6 +270,9 @@ export const routeTree = rootRoute
|
|||
},
|
||||
"/book": {
|
||||
"filePath": "book.lazy.tsx"
|
||||
},
|
||||
"/profile/$username": {
|
||||
"filePath": "profile/$username.tsx"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue