From cc2fb3543e3043f3f14351229201206b30b65981 Mon Sep 17 00:00:00 2001 From: Henrik Larsson Date: Tue, 8 Aug 2023 21:56:25 +0200 Subject: [PATCH] Removed suspense --- .../dynamic-content-manager.tsx | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/components/layout/dynamic-content-manager/dynamic-content-manager.tsx b/components/layout/dynamic-content-manager/dynamic-content-manager.tsx index 8b98728c7..cc1bbbbec 100644 --- a/components/layout/dynamic-content-manager/dynamic-content-manager.tsx +++ b/components/layout/dynamic-content-manager/dynamic-content-manager.tsx @@ -1,25 +1,24 @@ 'use client'; +import { InfoCircledIcon } from '@radix-ui/react-icons'; + import BlurbSection from '@/components/modules/blurb-section/blurb-section'; import FilteredProductList from '@/components/modules/filtered-product-list/filtered-product-list'; import Hero from '@/components/modules/hero'; import ReusableSection from '@/components/modules/reusable-section/reusable-section'; import Slider from '@/components/modules/slider/slider'; import USPSection from '@/components/modules/usp-section/usp-section'; -import { InfoCircledIcon } from '@radix-ui/react-icons'; -import { Suspense } from 'react'; interface getContentComponentProps { _type: string; _key: number; disabled: boolean; } -const getContentComponent = ( - { _type, _key, disabled, ...rest }: getContentComponentProps, - index: number -) => { +const getContentComponent = ({ _type, _key, disabled, ...rest }: getContentComponentProps) => { let Component: any; + console.log(_key); + switch (_type) { case 'hero': Component = Hero; @@ -68,16 +67,7 @@ const getContentComponent = ( } return Component ? ( - index == 0 ? ( - - ) : ( - Loading...} - > - - - ) + ) : (
Something else
);