mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +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 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>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user