mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 16:07:01 +00:00
29 lines
526 B
TypeScript
29 lines
526 B
TypeScript
import DynamicContentManager from 'components/layout/dynamic-content-manager';
|
|
|
|
interface ReusableSectionProps {
|
|
disabled: boolean;
|
|
section: {
|
|
existingSection: {
|
|
section: {
|
|
sectionType: [];
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
const ReusableSection = ({ disabled, section }: ReusableSectionProps) => {
|
|
if (disabled) {
|
|
return;
|
|
}
|
|
|
|
const data = section.existingSection.section.sectionType;
|
|
|
|
if (!data) {
|
|
return;
|
|
}
|
|
|
|
return <DynamicContentManager content={data} />;
|
|
};
|
|
|
|
export default ReusableSection;
|