mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 21:47:51 +00:00
Removed suspense from dynamic content
This commit is contained in:
parent
06e87a448d
commit
bc71f62b72
@ -7,7 +7,6 @@ import ReusableSection from '@/components/modules/reusable-section/reusable-sect
|
||||
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;
|
||||
@ -77,9 +76,7 @@ const getContentComponent = ({ _type, _key, disabled, ...rest }: getContentCompo
|
||||
}
|
||||
|
||||
return Component ? (
|
||||
<Suspense key={`${_key}`} fallback={<div>Loading...</div>}>
|
||||
<Component {...rest} />
|
||||
</Suspense>
|
||||
<Component key={`${_key}`} {...rest} />
|
||||
) : (
|
||||
<div key={`${_key}`}>Something else</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user