Skip to content

Commit ddb990e

Browse files
committed
TCA-505 - lazyload utils
1 parent 37e895f commit ddb990e

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

src-ts/utils/contact-support/ContactSupport.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import {
88
formGetInputFields,
99
formOnReset
1010
} from '../../lib'
11-
12-
export const toolTitle: string = 'Contact Support'
11+
import { toolTitle } from './contact-support.routes'
1312

1413
const ContactSupport: FC<{}> = () => {
1514

src-ts/utils/contact-support/contact-support.routes.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { contactSupportPath, PlatformRoute } from '../../lib'
1+
import { contactSupportPath, lazyLoad, PlatformRoute } from '../../lib'
22

3-
import { default as ContactSupport, toolTitle } from './ContactSupport'
3+
export const toolTitle: string = 'Contact Support'
4+
5+
const ContactSupport = lazyLoad(() => import('./ContactSupport'));
46

57
export const contactSupportRoutes: Array<PlatformRoute> = [
68
{

src-ts/utils/home/home.routes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { PlatformRoute } from '../../lib'
1+
import { lazyLoad, PlatformRoute } from '../../lib'
22

3-
import { default as Home } from './Home'
3+
const Home = lazyLoad(() => import('./Home'));
44

55
export const homeRoute: string = ''
66

src-ts/utils/settings/settings.routes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ToolTitle } from '../../config'
2-
import { PlatformRoute } from '../../lib'
2+
import { lazyLoad, PlatformRoute } from '../../lib'
33

4-
import { Account } from './account'
5-
import Settings from './Settings'
4+
const Account = lazyLoad(() => import('./account'), 'Account');
5+
const Settings = lazyLoad(() => import('./Settings'));
66

77
export const settingsRoutes: Array<PlatformRoute> = [
88
{

0 commit comments

Comments
 (0)