Removed suspense from dynamic content

This commit is contained in:
Henrik Larsson 2023-08-08 22:43:36 +02:00
parent 06e87a448d
commit bc71f62b72

View File

@ -7,7 +7,6 @@ import ReusableSection from '@/components/modules/reusable-section/reusable-sect
import Slider from '@/components/modules/slider/slider'; import Slider from '@/components/modules/slider/slider';
import USPSection from '@/components/modules/usp-section/usp-section'; import USPSection from '@/components/modules/usp-section/usp-section';
import { InfoCircledIcon } from '@radix-ui/react-icons'; import { InfoCircledIcon } from '@radix-ui/react-icons';
import { Suspense } from 'react';
interface getContentComponentProps { interface getContentComponentProps {
_type: string; _type: string;
_key: number; _key: number;
@ -77,9 +76,7 @@ const getContentComponent = ({ _type, _key, disabled, ...rest }: getContentCompo
} }
return Component ? ( return Component ? (
<Suspense key={`${_key}`} fallback={<div>Loading...</div>}> <Component key={`${_key}`} {...rest} />
<Component {...rest} />
</Suspense>
) : ( ) : (
<div key={`${_key}`}>Something else</div> <div key={`${_key}`}>Something else</div>
); );