From 42667038736f84946ca49e5c986bc135ba5adb57 Mon Sep 17 00:00:00 2001 From: Gabriel Henriques Date: Fri, 18 Jun 2021 18:21:28 -0300 Subject: [PATCH] Fix infinite render --- client/startup/routes.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/startup/routes.ts b/client/startup/routes.ts index d2bf3c9372d06..cd29aaeb8ab10 100644 --- a/client/startup/routes.ts +++ b/client/startup/routes.ts @@ -11,6 +11,10 @@ import { IUser } from '../../definition/IUser'; import { appLayout } from '../lib/appLayout'; import { createTemplateForComponent } from '../lib/portals/createTemplateForComponent'; +const SetupWizardRoute = lazy(() => import('../views/setupWizard/SetupWizardRoute')); +const MailerUnsubscriptionPage = lazy(() => import('../views/mailer/MailerUnsubscriptionPage')); +const NotFoundPage = lazy(() => import('../views/notFound/NotFoundPage')); + FlowRouter.wait(); FlowRouter.route('/', { @@ -161,7 +165,6 @@ FlowRouter.route('/invite/:hash', { FlowRouter.route('/setup-wizard/:step?', { name: 'setup-wizard', action: () => { - const SetupWizardRoute = lazy(() => import('../views/setupWizard/SetupWizardRoute')); appLayout.render({ component: SetupWizardRoute }); }, }); @@ -169,14 +172,12 @@ FlowRouter.route('/setup-wizard/:step?', { FlowRouter.route('/mailer/unsubscribe/:_id/:createdAt', { name: 'mailer-unsubscribe', action: () => { - const MailerUnsubscriptionPage = lazy(() => import('../views/mailer/MailerUnsubscriptionPage')); appLayout.render({ component: MailerUnsubscriptionPage }); }, }); FlowRouter.notFound = { action: (): void => { - const NotFoundPage = lazy(() => import('../views/notFound/NotFoundPage')); appLayout.render({ component: NotFoundPage }); }, };