⬆️ Update TansTack Router dependencies (#1853)
This commit is contained in:
@@ -1,129 +1,235 @@
|
||||
/* prettier-ignore-start */
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
// @ts-nocheck
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
// This file is auto-generated by TanStack Router
|
||||
// This file was automatically generated by TanStack Router.
|
||||
// You should NOT make any changes in this file as it will be overwritten.
|
||||
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
||||
|
||||
// Import Routes
|
||||
import { Route as rootRouteImport } from './routes/__root'
|
||||
import { Route as SignupRouteImport } from './routes/signup'
|
||||
import { Route as ResetPasswordRouteImport } from './routes/reset-password'
|
||||
import { Route as RecoverPasswordRouteImport } from './routes/recover-password'
|
||||
import { Route as LoginRouteImport } from './routes/login'
|
||||
import { Route as LayoutRouteImport } from './routes/_layout'
|
||||
import { Route as LayoutIndexRouteImport } from './routes/_layout/index'
|
||||
import { Route as LayoutSettingsRouteImport } from './routes/_layout/settings'
|
||||
import { Route as LayoutItemsRouteImport } from './routes/_layout/items'
|
||||
import { Route as LayoutAdminRouteImport } from './routes/_layout/admin'
|
||||
|
||||
import { Route as rootRoute } from './routes/__root'
|
||||
import { Route as SignupImport } from './routes/signup'
|
||||
import { Route as ResetPasswordImport } from './routes/reset-password'
|
||||
import { Route as RecoverPasswordImport } from './routes/recover-password'
|
||||
import { Route as LoginImport } from './routes/login'
|
||||
import { Route as LayoutImport } from './routes/_layout'
|
||||
import { Route as LayoutIndexImport } from './routes/_layout/index'
|
||||
import { Route as LayoutSettingsImport } from './routes/_layout/settings'
|
||||
import { Route as LayoutItemsImport } from './routes/_layout/items'
|
||||
import { Route as LayoutAdminImport } from './routes/_layout/admin'
|
||||
|
||||
// Create/Update Routes
|
||||
|
||||
const SignupRoute = SignupImport.update({
|
||||
const SignupRoute = SignupRouteImport.update({
|
||||
id: '/signup',
|
||||
path: '/signup',
|
||||
getParentRoute: () => rootRoute,
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
|
||||
const ResetPasswordRoute = ResetPasswordImport.update({
|
||||
const ResetPasswordRoute = ResetPasswordRouteImport.update({
|
||||
id: '/reset-password',
|
||||
path: '/reset-password',
|
||||
getParentRoute: () => rootRoute,
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
|
||||
const RecoverPasswordRoute = RecoverPasswordImport.update({
|
||||
const RecoverPasswordRoute = RecoverPasswordRouteImport.update({
|
||||
id: '/recover-password',
|
||||
path: '/recover-password',
|
||||
getParentRoute: () => rootRoute,
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
|
||||
const LoginRoute = LoginImport.update({
|
||||
const LoginRoute = LoginRouteImport.update({
|
||||
id: '/login',
|
||||
path: '/login',
|
||||
getParentRoute: () => rootRoute,
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
|
||||
const LayoutRoute = LayoutImport.update({
|
||||
const LayoutRoute = LayoutRouteImport.update({
|
||||
id: '/_layout',
|
||||
getParentRoute: () => rootRoute,
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
|
||||
const LayoutIndexRoute = LayoutIndexImport.update({
|
||||
const LayoutIndexRoute = LayoutIndexRouteImport.update({
|
||||
id: '/',
|
||||
path: '/',
|
||||
getParentRoute: () => LayoutRoute,
|
||||
} as any)
|
||||
|
||||
const LayoutSettingsRoute = LayoutSettingsImport.update({
|
||||
const LayoutSettingsRoute = LayoutSettingsRouteImport.update({
|
||||
id: '/settings',
|
||||
path: '/settings',
|
||||
getParentRoute: () => LayoutRoute,
|
||||
} as any)
|
||||
|
||||
const LayoutItemsRoute = LayoutItemsImport.update({
|
||||
const LayoutItemsRoute = LayoutItemsRouteImport.update({
|
||||
id: '/items',
|
||||
path: '/items',
|
||||
getParentRoute: () => LayoutRoute,
|
||||
} as any)
|
||||
|
||||
const LayoutAdminRoute = LayoutAdminImport.update({
|
||||
const LayoutAdminRoute = LayoutAdminRouteImport.update({
|
||||
id: '/admin',
|
||||
path: '/admin',
|
||||
getParentRoute: () => LayoutRoute,
|
||||
} as any)
|
||||
|
||||
// Populate the FileRoutesByPath interface
|
||||
export interface FileRoutesByFullPath {
|
||||
'/login': typeof LoginRoute
|
||||
'/recover-password': typeof RecoverPasswordRoute
|
||||
'/reset-password': typeof ResetPasswordRoute
|
||||
'/signup': typeof SignupRoute
|
||||
'/admin': typeof LayoutAdminRoute
|
||||
'/items': typeof LayoutItemsRoute
|
||||
'/settings': typeof LayoutSettingsRoute
|
||||
'/': typeof LayoutIndexRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/login': typeof LoginRoute
|
||||
'/recover-password': typeof RecoverPasswordRoute
|
||||
'/reset-password': typeof ResetPasswordRoute
|
||||
'/signup': typeof SignupRoute
|
||||
'/admin': typeof LayoutAdminRoute
|
||||
'/items': typeof LayoutItemsRoute
|
||||
'/settings': typeof LayoutSettingsRoute
|
||||
'/': typeof LayoutIndexRoute
|
||||
}
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRouteImport
|
||||
'/_layout': typeof LayoutRouteWithChildren
|
||||
'/login': typeof LoginRoute
|
||||
'/recover-password': typeof RecoverPasswordRoute
|
||||
'/reset-password': typeof ResetPasswordRoute
|
||||
'/signup': typeof SignupRoute
|
||||
'/_layout/admin': typeof LayoutAdminRoute
|
||||
'/_layout/items': typeof LayoutItemsRoute
|
||||
'/_layout/settings': typeof LayoutSettingsRoute
|
||||
'/_layout/': typeof LayoutIndexRoute
|
||||
}
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
fullPaths:
|
||||
| '/login'
|
||||
| '/recover-password'
|
||||
| '/reset-password'
|
||||
| '/signup'
|
||||
| '/admin'
|
||||
| '/items'
|
||||
| '/settings'
|
||||
| '/'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to:
|
||||
| '/login'
|
||||
| '/recover-password'
|
||||
| '/reset-password'
|
||||
| '/signup'
|
||||
| '/admin'
|
||||
| '/items'
|
||||
| '/settings'
|
||||
| '/'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/_layout'
|
||||
| '/login'
|
||||
| '/recover-password'
|
||||
| '/reset-password'
|
||||
| '/signup'
|
||||
| '/_layout/admin'
|
||||
| '/_layout/items'
|
||||
| '/_layout/settings'
|
||||
| '/_layout/'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
export interface RootRouteChildren {
|
||||
LayoutRoute: typeof LayoutRouteWithChildren
|
||||
LoginRoute: typeof LoginRoute
|
||||
RecoverPasswordRoute: typeof RecoverPasswordRoute
|
||||
ResetPasswordRoute: typeof ResetPasswordRoute
|
||||
SignupRoute: typeof SignupRoute
|
||||
}
|
||||
|
||||
declare module '@tanstack/react-router' {
|
||||
interface FileRoutesByPath {
|
||||
'/_layout': {
|
||||
preLoaderRoute: typeof LayoutImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/login': {
|
||||
preLoaderRoute: typeof LoginImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/recover-password': {
|
||||
preLoaderRoute: typeof RecoverPasswordImport
|
||||
parentRoute: typeof rootRoute
|
||||
'/signup': {
|
||||
id: '/signup'
|
||||
path: '/signup'
|
||||
fullPath: '/signup'
|
||||
preLoaderRoute: typeof SignupRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/reset-password': {
|
||||
preLoaderRoute: typeof ResetPasswordImport
|
||||
parentRoute: typeof rootRoute
|
||||
id: '/reset-password'
|
||||
path: '/reset-password'
|
||||
fullPath: '/reset-password'
|
||||
preLoaderRoute: typeof ResetPasswordRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/signup': {
|
||||
preLoaderRoute: typeof SignupImport
|
||||
parentRoute: typeof rootRoute
|
||||
'/recover-password': {
|
||||
id: '/recover-password'
|
||||
path: '/recover-password'
|
||||
fullPath: '/recover-password'
|
||||
preLoaderRoute: typeof RecoverPasswordRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/_layout/admin': {
|
||||
preLoaderRoute: typeof LayoutAdminImport
|
||||
parentRoute: typeof LayoutImport
|
||||
'/login': {
|
||||
id: '/login'
|
||||
path: '/login'
|
||||
fullPath: '/login'
|
||||
preLoaderRoute: typeof LoginRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/_layout/items': {
|
||||
preLoaderRoute: typeof LayoutItemsImport
|
||||
parentRoute: typeof LayoutImport
|
||||
}
|
||||
'/_layout/settings': {
|
||||
preLoaderRoute: typeof LayoutSettingsImport
|
||||
parentRoute: typeof LayoutImport
|
||||
'/_layout': {
|
||||
id: '/_layout'
|
||||
path: ''
|
||||
fullPath: ''
|
||||
preLoaderRoute: typeof LayoutRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/_layout/': {
|
||||
preLoaderRoute: typeof LayoutIndexImport
|
||||
parentRoute: typeof LayoutImport
|
||||
id: '/_layout/'
|
||||
path: '/'
|
||||
fullPath: '/'
|
||||
preLoaderRoute: typeof LayoutIndexRouteImport
|
||||
parentRoute: typeof LayoutRoute
|
||||
}
|
||||
'/_layout/settings': {
|
||||
id: '/_layout/settings'
|
||||
path: '/settings'
|
||||
fullPath: '/settings'
|
||||
preLoaderRoute: typeof LayoutSettingsRouteImport
|
||||
parentRoute: typeof LayoutRoute
|
||||
}
|
||||
'/_layout/items': {
|
||||
id: '/_layout/items'
|
||||
path: '/items'
|
||||
fullPath: '/items'
|
||||
preLoaderRoute: typeof LayoutItemsRouteImport
|
||||
parentRoute: typeof LayoutRoute
|
||||
}
|
||||
'/_layout/admin': {
|
||||
id: '/_layout/admin'
|
||||
path: '/admin'
|
||||
fullPath: '/admin'
|
||||
preLoaderRoute: typeof LayoutAdminRouteImport
|
||||
parentRoute: typeof LayoutRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create and export the route tree
|
||||
interface LayoutRouteChildren {
|
||||
LayoutAdminRoute: typeof LayoutAdminRoute
|
||||
LayoutItemsRoute: typeof LayoutItemsRoute
|
||||
LayoutSettingsRoute: typeof LayoutSettingsRoute
|
||||
LayoutIndexRoute: typeof LayoutIndexRoute
|
||||
}
|
||||
|
||||
export const routeTree = rootRoute.addChildren([
|
||||
LayoutRoute.addChildren([
|
||||
LayoutAdminRoute,
|
||||
LayoutItemsRoute,
|
||||
LayoutSettingsRoute,
|
||||
LayoutIndexRoute,
|
||||
]),
|
||||
LoginRoute,
|
||||
RecoverPasswordRoute,
|
||||
ResetPasswordRoute,
|
||||
SignupRoute,
|
||||
])
|
||||
const LayoutRouteChildren: LayoutRouteChildren = {
|
||||
LayoutAdminRoute: LayoutAdminRoute,
|
||||
LayoutItemsRoute: LayoutItemsRoute,
|
||||
LayoutSettingsRoute: LayoutSettingsRoute,
|
||||
LayoutIndexRoute: LayoutIndexRoute,
|
||||
}
|
||||
|
||||
/* prettier-ignore-end */
|
||||
const LayoutRouteWithChildren =
|
||||
LayoutRoute._addFileChildren(LayoutRouteChildren)
|
||||
|
||||
const rootRouteChildren: RootRouteChildren = {
|
||||
LayoutRoute: LayoutRouteWithChildren,
|
||||
LoginRoute: LoginRoute,
|
||||
RecoverPasswordRoute: RecoverPasswordRoute,
|
||||
ResetPasswordRoute: ResetPasswordRoute,
|
||||
SignupRoute: SignupRoute,
|
||||
}
|
||||
export const routeTree = rootRouteImport
|
||||
._addFileChildren(rootRouteChildren)
|
||||
._addFileTypes<FileRouteTypes>()
|
||||
|
||||
@@ -44,10 +44,12 @@ function UsersTable() {
|
||||
placeholderData: (prevData) => prevData,
|
||||
})
|
||||
|
||||
const setPage = (page: number) =>
|
||||
const setPage = (page: number) => {
|
||||
navigate({
|
||||
search: (prev: { [key: string]: string }) => ({ ...prev, page }),
|
||||
to: "/_layout/admin",
|
||||
search: { page: page },
|
||||
})
|
||||
}
|
||||
|
||||
const users = data?.data.slice(0, PER_PAGE) ?? []
|
||||
const count = data?.count ?? 0
|
||||
|
||||
@@ -50,10 +50,12 @@ function ItemsTable() {
|
||||
placeholderData: (prevData) => prevData,
|
||||
})
|
||||
|
||||
const setPage = (page: number) =>
|
||||
const setPage = (page: number) => {
|
||||
navigate({
|
||||
search: (prev: { [key: string]: string }) => ({ ...prev, page }),
|
||||
to: "/_layout/items",
|
||||
search: { page: page },
|
||||
})
|
||||
}
|
||||
|
||||
const items = data?.data.slice(0, PER_PAGE) ?? []
|
||||
const count = data?.count ?? 0
|
||||
|
||||
Reference in New Issue
Block a user