⬆️ Update TansTack Router dependencies (#1853)
This commit is contained in:
2419
frontend/package-lock.json
generated
2419
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
|||||||
"@emotion/react": "^11.14.0",
|
"@emotion/react": "^11.14.0",
|
||||||
"@tanstack/react-query": "^5.87.1",
|
"@tanstack/react-query": "^5.87.1",
|
||||||
"@tanstack/react-query-devtools": "^5.87.1",
|
"@tanstack/react-query-devtools": "^5.87.1",
|
||||||
"@tanstack/react-router": "1.19.1",
|
"@tanstack/react-router": "^1.131.36",
|
||||||
"axios": "1.9.0",
|
"axios": "1.9.0",
|
||||||
"form-data": "4.0.4",
|
"form-data": "4.0.4",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
"@hey-api/openapi-ts": "0.73.0",
|
"@hey-api/openapi-ts": "0.73.0",
|
||||||
"@playwright/test": "^1.55.0",
|
"@playwright/test": "^1.55.0",
|
||||||
"@tanstack/router-devtools": "1.19.1",
|
"@tanstack/router-devtools": "^1.131.36",
|
||||||
"@tanstack/router-vite-plugin": "1.19.0",
|
"@tanstack/router-plugin": "^1.131.36",
|
||||||
"@types/node": "^22.15.3",
|
"@types/node": "^22.15.3",
|
||||||
"@types/react": "^19.1.12",
|
"@types/react": "^19.1.12",
|
||||||
"@types/react-dom": "^19.1.9",
|
"@types/react-dom": "^19.1.9",
|
||||||
|
|||||||
@@ -1,129 +1,235 @@
|
|||||||
/* prettier-ignore-start */
|
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
// noinspection JSUnusedGlobalSymbols
|
// 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'
|
const SignupRoute = SignupRouteImport.update({
|
||||||
import { Route as SignupImport } from './routes/signup'
|
id: '/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({
|
|
||||||
path: '/signup',
|
path: '/signup',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const ResetPasswordRoute = ResetPasswordRouteImport.update({
|
||||||
const ResetPasswordRoute = ResetPasswordImport.update({
|
id: '/reset-password',
|
||||||
path: '/reset-password',
|
path: '/reset-password',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const RecoverPasswordRoute = RecoverPasswordRouteImport.update({
|
||||||
const RecoverPasswordRoute = RecoverPasswordImport.update({
|
id: '/recover-password',
|
||||||
path: '/recover-password',
|
path: '/recover-password',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const LoginRoute = LoginRouteImport.update({
|
||||||
const LoginRoute = LoginImport.update({
|
id: '/login',
|
||||||
path: '/login',
|
path: '/login',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const LayoutRoute = LayoutRouteImport.update({
|
||||||
const LayoutRoute = LayoutImport.update({
|
|
||||||
id: '/_layout',
|
id: '/_layout',
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const LayoutIndexRoute = LayoutIndexRouteImport.update({
|
||||||
const LayoutIndexRoute = LayoutIndexImport.update({
|
id: '/',
|
||||||
path: '/',
|
path: '/',
|
||||||
getParentRoute: () => LayoutRoute,
|
getParentRoute: () => LayoutRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
const LayoutSettingsRoute = LayoutSettingsRouteImport.update({
|
||||||
const LayoutSettingsRoute = LayoutSettingsImport.update({
|
id: '/settings',
|
||||||
path: '/settings',
|
path: '/settings',
|
||||||
getParentRoute: () => LayoutRoute,
|
getParentRoute: () => LayoutRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
const LayoutItemsRoute = LayoutItemsRouteImport.update({
|
||||||
const LayoutItemsRoute = LayoutItemsImport.update({
|
id: '/items',
|
||||||
path: '/items',
|
path: '/items',
|
||||||
getParentRoute: () => LayoutRoute,
|
getParentRoute: () => LayoutRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
const LayoutAdminRoute = LayoutAdminRouteImport.update({
|
||||||
const LayoutAdminRoute = LayoutAdminImport.update({
|
id: '/admin',
|
||||||
path: '/admin',
|
path: '/admin',
|
||||||
getParentRoute: () => LayoutRoute,
|
getParentRoute: () => LayoutRoute,
|
||||||
} as any)
|
} 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' {
|
declare module '@tanstack/react-router' {
|
||||||
interface FileRoutesByPath {
|
interface FileRoutesByPath {
|
||||||
'/_layout': {
|
'/signup': {
|
||||||
preLoaderRoute: typeof LayoutImport
|
id: '/signup'
|
||||||
parentRoute: typeof rootRoute
|
path: '/signup'
|
||||||
}
|
fullPath: '/signup'
|
||||||
'/login': {
|
preLoaderRoute: typeof SignupRouteImport
|
||||||
preLoaderRoute: typeof LoginImport
|
parentRoute: typeof rootRouteImport
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
|
||||||
'/recover-password': {
|
|
||||||
preLoaderRoute: typeof RecoverPasswordImport
|
|
||||||
parentRoute: typeof rootRoute
|
|
||||||
}
|
}
|
||||||
'/reset-password': {
|
'/reset-password': {
|
||||||
preLoaderRoute: typeof ResetPasswordImport
|
id: '/reset-password'
|
||||||
parentRoute: typeof rootRoute
|
path: '/reset-password'
|
||||||
|
fullPath: '/reset-password'
|
||||||
|
preLoaderRoute: typeof ResetPasswordRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/signup': {
|
'/recover-password': {
|
||||||
preLoaderRoute: typeof SignupImport
|
id: '/recover-password'
|
||||||
parentRoute: typeof rootRoute
|
path: '/recover-password'
|
||||||
|
fullPath: '/recover-password'
|
||||||
|
preLoaderRoute: typeof RecoverPasswordRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/_layout/admin': {
|
'/login': {
|
||||||
preLoaderRoute: typeof LayoutAdminImport
|
id: '/login'
|
||||||
parentRoute: typeof LayoutImport
|
path: '/login'
|
||||||
|
fullPath: '/login'
|
||||||
|
preLoaderRoute: typeof LoginRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/_layout/items': {
|
'/_layout': {
|
||||||
preLoaderRoute: typeof LayoutItemsImport
|
id: '/_layout'
|
||||||
parentRoute: typeof LayoutImport
|
path: ''
|
||||||
}
|
fullPath: ''
|
||||||
'/_layout/settings': {
|
preLoaderRoute: typeof LayoutRouteImport
|
||||||
preLoaderRoute: typeof LayoutSettingsImport
|
parentRoute: typeof rootRouteImport
|
||||||
parentRoute: typeof LayoutImport
|
|
||||||
}
|
}
|
||||||
'/_layout/': {
|
'/_layout/': {
|
||||||
preLoaderRoute: typeof LayoutIndexImport
|
id: '/_layout/'
|
||||||
parentRoute: typeof LayoutImport
|
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([
|
const LayoutRouteChildren: LayoutRouteChildren = {
|
||||||
LayoutRoute.addChildren([
|
LayoutAdminRoute: LayoutAdminRoute,
|
||||||
LayoutAdminRoute,
|
LayoutItemsRoute: LayoutItemsRoute,
|
||||||
LayoutItemsRoute,
|
LayoutSettingsRoute: LayoutSettingsRoute,
|
||||||
LayoutSettingsRoute,
|
LayoutIndexRoute: LayoutIndexRoute,
|
||||||
LayoutIndexRoute,
|
}
|
||||||
]),
|
|
||||||
LoginRoute,
|
|
||||||
RecoverPasswordRoute,
|
|
||||||
ResetPasswordRoute,
|
|
||||||
SignupRoute,
|
|
||||||
])
|
|
||||||
|
|
||||||
/* 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,
|
placeholderData: (prevData) => prevData,
|
||||||
})
|
})
|
||||||
|
|
||||||
const setPage = (page: number) =>
|
const setPage = (page: number) => {
|
||||||
navigate({
|
navigate({
|
||||||
search: (prev: { [key: string]: string }) => ({ ...prev, page }),
|
to: "/_layout/admin",
|
||||||
|
search: { page: page },
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const users = data?.data.slice(0, PER_PAGE) ?? []
|
const users = data?.data.slice(0, PER_PAGE) ?? []
|
||||||
const count = data?.count ?? 0
|
const count = data?.count ?? 0
|
||||||
|
|||||||
@@ -50,10 +50,12 @@ function ItemsTable() {
|
|||||||
placeholderData: (prevData) => prevData,
|
placeholderData: (prevData) => prevData,
|
||||||
})
|
})
|
||||||
|
|
||||||
const setPage = (page: number) =>
|
const setPage = (page: number) => {
|
||||||
navigate({
|
navigate({
|
||||||
search: (prev: { [key: string]: string }) => ({ ...prev, page }),
|
to: "/_layout/items",
|
||||||
|
search: { page: page },
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const items = data?.data.slice(0, PER_PAGE) ?? []
|
const items = data?.data.slice(0, PER_PAGE) ?? []
|
||||||
const count = data?.count ?? 0
|
const count = data?.count ?? 0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
import { TanStackRouterVite } from "@tanstack/router-vite-plugin"
|
import { tanstackRouter } from '@tanstack/router-plugin/vite'
|
||||||
import react from "@vitejs/plugin-react-swc"
|
import react from "@vitejs/plugin-react-swc"
|
||||||
import { defineConfig } from "vite"
|
import { defineConfig } from "vite"
|
||||||
|
|
||||||
@@ -10,5 +10,10 @@ export default defineConfig({
|
|||||||
"@": path.resolve(__dirname, "./src"),
|
"@": path.resolve(__dirname, "./src"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [react(), TanStackRouterVite()],
|
plugins: [
|
||||||
|
tanstackRouter({
|
||||||
|
target: "react",
|
||||||
|
autoCodeSplitting: true,
|
||||||
|
}),
|
||||||
|
react()],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user