From 26112cc5e7f72e1629c8d122abd38ff8b94fabd3 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 22 Oct 2025 15:21:55 +0700 Subject: try --- src/lib/product/components/ProductCard.jsx | 64 +++++++++++------------------- 1 file changed, 23 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 8a1c611c..814ae62d 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -375,7 +375,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { - {/* BADGE DISKON KIRI-ATAS (tetap seperti punyamu) */} + {/* BADGE DISKON KIRI-ATAS */} {(product?.lowestPrice?.discountPercentage ?? 0) > 0 && (
@@ -396,28 +396,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { />
- {/* Old */} - {/*
-
- - {Math.floor(product?.lowestPrice.discountPercentage)}% - -
-
- - - {product?.flashSale?.tag != 'false' || product?.flashSale?.tag - ? product?.flashSale?.tag - : 'FLASH SALE'} - -
-
*/} + {/* (konten lama dikomentari) */}
)} @@ -428,7 +407,8 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )} -
+ {/* ⬇️ min-w-0 agar anak flex boleh wrap */} +
{product?.manufacture?.name ? ( { {product?.flashSale?.id > 0 && product?.lowestPrice.discountPercentage > 0 ? ( <> -
-
+ {/* ⬇️ izinkan wrap supaya tidak overflow */} +
+
{currencyFormat(product.lowestPrice.price)}
- {/*
- {Math.floor(product?.lowestPrice.discountPercentage)}% -
*/}
-
+ + {/* ⬇️ harga & PPN boleh pindah baris */} +
{product?.lowestPrice.priceDiscount > 0 ? ( <> {currencyFormat(product?.lowestPrice.priceDiscount)} -
+
Include PPN:{' '} {currencyFormat( product.lowestPrice.priceDiscount * @@ -521,11 +501,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {discount > 0 && (product?.flashSale?.id ?? 0) < 1 && (
-
- Voucher - - - + {/* ⬇️ gunakan flex-wrap & min-w-0 */} +
+ Voucher + + + {currencyFormat(discount)} @@ -705,11 +686,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {discount > 0 && (product?.flashSale?.id ?? 0) < 1 && (
-
- Voucher - - - + {/* ⬇️ gunakan flex-wrap & min-w-0 */} +
+ Voucher + + + {currencyFormat(discount)} -- cgit v1.2.3