This commit is contained in:
2024-03-03 07:23:41 +03:00
parent d43c0a5839
commit 0db252bb27
57 changed files with 1707 additions and 105 deletions

View File

@@ -17,6 +17,8 @@ import { Route as rootRoute } from './routes/__root'
// Create Virtual Routes
const TestLazyImport = createFileRoute('/test')()
const LoginLazyImport = createFileRoute('/login')()
const LeadsLazyImport = createFileRoute('/leads')()
const IndexLazyImport = createFileRoute('/')()
// Create/Update Routes
@@ -26,6 +28,16 @@ const TestLazyRoute = TestLazyImport.update({
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./routes/test.lazy').then((d) => d.Route))
const LoginLazyRoute = LoginLazyImport.update({
path: '/login',
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./routes/login.lazy').then((d) => d.Route))
const LeadsLazyRoute = LeadsLazyImport.update({
path: '/leads',
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./routes/leads.lazy').then((d) => d.Route))
const IndexLazyRoute = IndexLazyImport.update({
path: '/',
getParentRoute: () => rootRoute,
@@ -39,6 +51,14 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexLazyImport
parentRoute: typeof rootRoute
}
'/leads': {
preLoaderRoute: typeof LeadsLazyImport
parentRoute: typeof rootRoute
}
'/login': {
preLoaderRoute: typeof LoginLazyImport
parentRoute: typeof rootRoute
}
'/test': {
preLoaderRoute: typeof TestLazyImport
parentRoute: typeof rootRoute
@@ -48,6 +68,11 @@ declare module '@tanstack/react-router' {
// Create and export the route tree
export const routeTree = rootRoute.addChildren([IndexLazyRoute, TestLazyRoute])
export const routeTree = rootRoute.addChildren([
IndexLazyRoute,
LeadsLazyRoute,
LoginLazyRoute,
TestLazyRoute,
])
/* prettier-ignore-end */