From 0b915db9eb55c2099ea5250078c814b1229a1416 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Thu, 20 Nov 2025 07:31:11 +0100 Subject: [PATCH] refactor(ProductDetailPage): improve layout and button functionality - Adjusted layout to ensure a minimum height for attribute images and action buttons. - Enhanced button functionality by updating the availability request button and ensuring proper alignment of action buttons. - Cleaned up conditional rendering for attribute images to streamline the component's structure. --- src/components/ProductDetailPage.js | 94 +++++++++++++++-------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/src/components/ProductDetailPage.js b/src/components/ProductDetailPage.js index 27a6ce0..474b9a2 100644 --- a/src/components/ProductDetailPage.js +++ b/src/components/ProductDetailPage.js @@ -1277,8 +1277,9 @@ class ProductDetailPage extends Component { )} {/* Attribute images and chips with action buttons */} - {(attributes.some(attr => attributeImages[attr.kMerkmalWert]) || attributes.some(attr => !attributeImages[attr.kMerkmalWert])) && ( - + + + {(attributes.some(attr => attributeImages[attr.kMerkmalWert]) || attributes.some(attr => !attributeImages[attr.kMerkmalWert])) && ( {attributes .filter(attribute => attributeImages[attribute.kMerkmalWert]) @@ -1314,62 +1315,63 @@ class ProductDetailPage extends Component { /> ))} + )} - {/* Right-aligned action buttons */} - + {/* Right-aligned action buttons */} + + + + {(product.available !== 1 && product.availableSupplier !== 1) && ( - - {(product.available !== 1 && product.availableSupplier !== 1) && ( - - )} - - - )} + )} + + + {/* Weight */} {product.weight > 0 && (