This commit is contained in:
Your Name committed 2026-10-01 15:42:52 +07:00
1 parent 2d39edbd57
commit 78b722e120
24 files changed
+2130 -65

No files matched your search

+16
View File
@@ -6,6 +6,8 @@ import Footer from '../components/Footer'
import ProductCard from '../components/ProductCard'
import ProductReviews from '../components/ProductReviews'
import ProductImageGallery from '../components/ProductImageGallery'
import ProductHeroCarousel from '../components/ProductHeroCarousel'
import ProductDivider from '../components/ProductDivider'
import DynamicPageRenderer from '../components/DynamicPageRenderer'
import { API_BASE, getCategoryImage, formatPrice, type Category, type Product, type PageSection, type ProductAttribute, type ProductDetailSection, type TranslatableString } from '../types'
import { useCartStore } from '../store/cartStore'
@@ -474,6 +476,20 @@ export default function ProductDetailPage() {
return renderProductNativeSection(section, index);
}
if (section.type.toUpperCase() === 'HERO_CAROUSEL') {
return (
<ProductHeroCarousel
key={section.id}
payload={section.payload}
lang={i18n.language}
/>
);
}
if (section.type.toUpperCase() === 'DIVIDER') {
return <ProductDivider key={section.id} payload={section.payload} />;
}
return (
<DynamicPageRenderer
key={section.id}