|
1 | 1 | import { Navigate } from 'react-router-dom' |
2 | 2 |
|
3 | | -import { contactSupportPath, PlatformRoute } from '../../lib' |
| 3 | +import { contactSupportPath, lazyLoad, LazyLoadedComponent, PlatformRoute } from '../../lib' |
4 | 4 |
|
5 | | -import { dashboardTitle, default as WorkComponent, toolTitle } from './Work' |
| 5 | +import { dashboardTitle, toolTitle } from './Work' |
6 | 6 | import { Work, WorkIntakeFormRoutes, WorkStatus, WorkType } from './work-lib' |
7 | 7 | import { WorkLoginPrompt } from './work-login-prompt' |
8 | | -import { WorkNotLoggedIn } from './work-not-logged-in' |
9 | | -import { |
10 | | - BugHuntIntakeForm, |
11 | | - IntakeForms, |
12 | | - intakeFormsTitle, |
13 | | - Review, |
14 | | -} from './work-self-service' |
15 | | -import SaveAfterLogin from './work-self-service/intake-forms/save-after-login/SaveAfterLogin' |
16 | | -import { WorkTable } from './work-table' |
17 | | -import { WorkThankYou } from './work-thank-you' |
| 8 | +import { intakeFormsTitle } from './work-self-service' |
| 9 | + |
| 10 | +const WorkComponent: LazyLoadedComponent = lazyLoad(() => import('./Work')) |
| 11 | +const WorkNotLoggedIn: LazyLoadedComponent = lazyLoad(() => import('./work-not-logged-in'), 'WorkNotLoggedIn') |
| 12 | +const BugHuntIntakeForm: LazyLoadedComponent = lazyLoad(() => import('./work-self-service'), 'BugHuntIntakeForm') |
| 13 | +const IntakeForms: LazyLoadedComponent = lazyLoad(() => import('./work-self-service'), 'IntakeForms') |
| 14 | +const Review: LazyLoadedComponent = lazyLoad(() => import('./work-self-service'), 'Review') |
| 15 | +const SaveAfterLogin: LazyLoadedComponent = lazyLoad(() => import('./work-self-service/intake-forms/save-after-login/SaveAfterLogin')) |
| 16 | +const WorkTable: LazyLoadedComponent = lazyLoad(() => import('./work-table'), 'WorkTable') |
| 17 | +const WorkThankYou: LazyLoadedComponent = lazyLoad(() => import('./work-thank-you'), 'WorkThankYou') |
18 | 18 |
|
19 | 19 | export const rootRoute: string = '/work' |
20 | 20 | export const selfServiceRootRoute: string = '/self-service' |
21 | 21 | export const selfServiceStartRoute: string = `${selfServiceRootRoute}/wizard` |
22 | 22 | export const dashboardRoute: string = `${rootRoute}/dashboard` |
23 | 23 |
|
24 | 24 | export function workDashboardRoute(active: string): string { |
25 | | -return `${dashboardRoute}/${active}` |
| 25 | + return `${dashboardRoute}/${active}` |
26 | 26 | } |
27 | 27 |
|
28 | 28 | export function workDetailOrDraftRoute(selectedWork: Work): string { |
|
0 commit comments