This commit is contained in:
2024-03-28 08:22:27 +03:00
parent c9f3d4ee12
commit 806e73bb5a
27 changed files with 432 additions and 92 deletions

View File

@@ -18,6 +18,7 @@ import { Route as rootRoute } from './routes/__root'
const TestLazyImport = createFileRoute('/test')()
const ServicesLazyImport = createFileRoute('/services')()
const ProductsLazyImport = createFileRoute('/products')()
const LoginLazyImport = createFileRoute('/login')()
const LeadsLazyImport = createFileRoute('/leads')()
const ClientsLazyImport = createFileRoute('/clients')()
@@ -35,6 +36,11 @@ const ServicesLazyRoute = ServicesLazyImport.update({
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./routes/services.lazy').then((d) => d.Route))
const ProductsLazyRoute = ProductsLazyImport.update({
path: '/products',
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./routes/products.lazy').then((d) => d.Route))
const LoginLazyRoute = LoginLazyImport.update({
path: '/login',
getParentRoute: () => rootRoute,
@@ -75,6 +81,10 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof LoginLazyImport
parentRoute: typeof rootRoute
}
'/products': {
preLoaderRoute: typeof ProductsLazyImport
parentRoute: typeof rootRoute
}
'/services': {
preLoaderRoute: typeof ServicesLazyImport
parentRoute: typeof rootRoute
@@ -93,6 +103,7 @@ export const routeTree = rootRoute.addChildren([
ClientsLazyRoute,
LeadsLazyRoute,
LoginLazyRoute,
ProductsLazyRoute,
ServicesLazyRoute,
TestLazyRoute,
])