You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
frontend: lazy-load all routes
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
// This file is auto-generated by TanStack Router
|
||||
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
|
||||
// Import Routes
|
||||
|
||||
import { Route as rootRoute } from './routes/__root'
|
||||
@@ -19,27 +21,36 @@ import { Route as ClientsIdImport } from './routes/clients.$id'
|
||||
import { Route as PasswordRecoveryIndexImport } from './routes/password.recovery.index'
|
||||
import { Route as PasswordChangeIndexImport } from './routes/password.change.index'
|
||||
import { Route as AccountSessionsIndexImport } from './routes/_account.sessions.index'
|
||||
import { Route as PasswordChangeSuccessImport } from './routes/password.change.success'
|
||||
import { Route as EmailsIdVerifyImport } from './routes/emails.$id.verify'
|
||||
import { Route as AccountSessionsBrowsersImport } from './routes/_account.sessions.browsers'
|
||||
import { Route as AccountSessionsIdImport } from './routes/_account.sessions.$id'
|
||||
|
||||
// Create Virtual Routes
|
||||
|
||||
const PasswordChangeSuccessLazyImport = createFileRoute(
|
||||
'/password/change/success',
|
||||
)()
|
||||
|
||||
// Create/Update Routes
|
||||
|
||||
const ResetCrossSigningRoute = ResetCrossSigningImport.update({
|
||||
path: '/reset-cross-signing',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/reset-cross-signing.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const AccountRoute = AccountImport.update({
|
||||
id: '/_account',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
} as any).lazy(() => import('./routes/_account.lazy').then((d) => d.Route))
|
||||
|
||||
const AccountIndexRoute = AccountIndexImport.update({
|
||||
path: '/',
|
||||
getParentRoute: () => AccountRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/_account.index.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const DevicesSplatRoute = DevicesSplatImport.update({
|
||||
path: '/devices/$',
|
||||
@@ -49,7 +60,7 @@ const DevicesSplatRoute = DevicesSplatImport.update({
|
||||
const ClientsIdRoute = ClientsIdImport.update({
|
||||
path: '/clients/$id',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
} as any).lazy(() => import('./routes/clients.$id.lazy').then((d) => d.Route))
|
||||
|
||||
const PasswordRecoveryIndexRoute = PasswordRecoveryIndexImport.update({
|
||||
path: '/password/recovery/',
|
||||
@@ -68,27 +79,37 @@ const PasswordChangeIndexRoute = PasswordChangeIndexImport.update({
|
||||
const AccountSessionsIndexRoute = AccountSessionsIndexImport.update({
|
||||
path: '/sessions/',
|
||||
getParentRoute: () => AccountRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/_account.sessions.index.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const PasswordChangeSuccessRoute = PasswordChangeSuccessImport.update({
|
||||
const PasswordChangeSuccessLazyRoute = PasswordChangeSuccessLazyImport.update({
|
||||
path: '/password/change/success',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/password.change.success.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const EmailsIdVerifyRoute = EmailsIdVerifyImport.update({
|
||||
path: '/emails/$id/verify',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/emails.$id.verify.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const AccountSessionsBrowsersRoute = AccountSessionsBrowsersImport.update({
|
||||
path: '/sessions/browsers',
|
||||
getParentRoute: () => AccountRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/_account.sessions.browsers.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
const AccountSessionsIdRoute = AccountSessionsIdImport.update({
|
||||
path: '/sessions/$id',
|
||||
getParentRoute: () => AccountRoute,
|
||||
} as any)
|
||||
} as any).lazy(() =>
|
||||
import('./routes/_account.sessions.$id.lazy').then((d) => d.Route),
|
||||
)
|
||||
|
||||
// Populate the FileRoutesByPath interface
|
||||
|
||||
@@ -154,7 +175,7 @@ declare module '@tanstack/react-router' {
|
||||
id: '/password/change/success'
|
||||
path: '/password/change/success'
|
||||
fullPath: '/password/change/success'
|
||||
preLoaderRoute: typeof PasswordChangeSuccessImport
|
||||
preLoaderRoute: typeof PasswordChangeSuccessLazyImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/_account/sessions/': {
|
||||
@@ -194,7 +215,7 @@ export const routeTree = rootRoute.addChildren({
|
||||
ClientsIdRoute,
|
||||
DevicesSplatRoute,
|
||||
EmailsIdVerifyRoute,
|
||||
PasswordChangeSuccessRoute,
|
||||
PasswordChangeSuccessLazyRoute,
|
||||
PasswordChangeIndexRoute,
|
||||
PasswordRecoveryIndexRoute,
|
||||
})
|
||||
@@ -251,7 +272,7 @@ export const routeTree = rootRoute.addChildren({
|
||||
"filePath": "emails.$id.verify.tsx"
|
||||
},
|
||||
"/password/change/success": {
|
||||
"filePath": "password.change.success.tsx"
|
||||
"filePath": "password.change.success.lazy.tsx"
|
||||
},
|
||||
"/_account/sessions/": {
|
||||
"filePath": "_account.sessions.index.tsx",
|
||||
|
Reference in New Issue
Block a user