diff --git a/src/PrerenderProduct.js b/src/PrerenderProduct.js index 08dda0f..4b49c59 100644 --- a/src/PrerenderProduct.js +++ b/src/PrerenderProduct.js @@ -174,7 +174,11 @@ class PrerenderProduct extends React.Component { ProductImage, { product: product, - isPrerender: true + socket: null, + socketB: null, + fullscreenOpen: false, + onOpenFullscreen: null, + onCloseFullscreen: null } ), // Product Details Section diff --git a/src/components/ProductDetailPage.js b/src/components/ProductDetailPage.js index 582f4aa..2cf4dc1 100644 --- a/src/components/ProductDetailPage.js +++ b/src/components/ProductDetailPage.js @@ -677,7 +677,6 @@ class ProductDetailPage extends Component { fullscreenOpen={this.state.imageDialogOpen} onOpenFullscreen={this.handleOpenDialog} onCloseFullscreen={this.handleCloseDialog} - isPrerender={false} /> {/* Product Details */} diff --git a/src/components/ProductImage.js b/src/components/ProductImage.js index c5d9a36..ea8af83 100644 --- a/src/components/ProductImage.js +++ b/src/components/ProductImage.js @@ -9,18 +9,9 @@ const ProductImage = ({ socketB, fullscreenOpen, onOpenFullscreen, - onCloseFullscreen, - isPrerender = false + onCloseFullscreen }) => { - // For prerender, use static image path - const getImagePath = (pictureList) => { - if (!pictureList || !pictureList.trim()) { - return '/assets/images/nopicture.jpg'; - } - return `/assets/images/prod${pictureList.split(',')[0].trim()}.jpg`; - }; - - // Container styling - same for both versions + // Container styling - unified for all versions const containerSx = { width: { xs: "100%", sm: "555px" }, maxWidth: "100%", @@ -32,42 +23,6 @@ const ProductImage = ({ justifyContent: "center", }; - if (isPrerender) { - // Prerender version - use CardMedia with static paths - return ( - - {!product.pictureList && ( - - )} - {product.pictureList && ( - - - - )} - - ); - } - - // SPA version - use existing Images component return ( {!product.pictureList && (