From ec17a2f99e4a967bf61bb08590c50a0f48c55bab Mon Sep 17 00:00:00 2001 From: Tony Vi Date: Tue, 8 Aug 2023 19:50:45 +0300 Subject: [PATCH] chore(Page): dynamic load for GoalPreview --- src/components/GoalPreview/GoalPreview.tsx | 2 ++ src/components/Page.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/GoalPreview/GoalPreview.tsx b/src/components/GoalPreview/GoalPreview.tsx index 1fa8de682..0c3b9a9f6 100644 --- a/src/components/GoalPreview/GoalPreview.tsx +++ b/src/components/GoalPreview/GoalPreview.tsx @@ -421,3 +421,5 @@ export const GoalPreview: FC = () => { /> )); }; + +export default GoalPreview; diff --git a/src/components/Page.tsx b/src/components/Page.tsx index 2679b5a3c..7a2fe9f2a 100644 --- a/src/components/Page.tsx +++ b/src/components/Page.tsx @@ -18,8 +18,8 @@ import { GlobalStyle } from './GlobalStyle'; import { PageHeader } from './PageHeader/PageHeader'; import { PageFooter } from './PageFooter/PageFooter'; import { ModalContext } from './ModalOnEvent'; -import { GoalPreview } from './GoalPreview/GoalPreview'; +const GoalPreview = dynamic(() => import('./GoalPreview/GoalPreview')); const ModalOnEvent = dynamic(() => import('./ModalOnEvent')); const ProjectCreateForm = dynamic(() => import('./ProjectCreateForm/ProjectCreateForm')); const GoalCreateForm = dynamic(() => import('./GoalCreateForm/GoalCreateForm'));