diff --git a/src/features/components/molecules/layout-overlay/index.tsx b/src/features/components/molecules/layout-overlay/index.tsx index 74e6ff210fd..d746d5cd33a 100644 --- a/src/features/components/molecules/layout-overlay/index.tsx +++ b/src/features/components/molecules/layout-overlay/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, { Suspense, lazy } from 'react' import pMinDelay from 'p-min-delay' import loadable from '@loadable/component' import { overlay_container } from './layout-overlay.module.scss' @@ -9,7 +9,7 @@ import { getLocationPathname, getLanguage } from 'common/utility' const LiveChatButton = loadable(() => pMinDelay(import('./live-chat-button'), 5000)) const WhatsappButton = loadable(() => pMinDelay(import('./whats-app-button'), 5000)) -const CookieBanner = loadable(() => pMinDelay(import('./cookie-banner'), 5000)) +const CookieBanner = lazy(() => pMinDelay(import('./cookie-banner'), 5000)) const LayoutOverlay = () => { const is_rtl = useIsRtl() @@ -37,7 +37,9 @@ const LayoutOverlay = () => { align="end" > - + }> + +