From 0f7846a32deec5cb400d9e73c2f2127b5de1cffd Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Mon, 10 Apr 2023 09:55:59 +0700 Subject: if variant = 1 --- .../product/components/Product/ProductDesktop.jsx | 173 ++++++++++++--------- 1 file changed, 100 insertions(+), 73 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index e0d2a959..8983f241 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -161,14 +161,38 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { )} - - + {product.variants.length > 1 ? ( + + ) : ( + + + + + + )}
-
-
Varian Produk
-
- - - - - - - - - - - - {product.variants.map((variant) => ( - - - - - - + {product.variants.length > 1 && ( +
+
Varian Produk
+
+
Part NumberVarianHargaJumlahAction
{variant.code}{variant.attributes.join(', ') || '-'} - {variant.price.discountPercentage > 0 && variant.price.priceDiscount > 0 && ( - <> -
- {currencyFormat(variant.price.price)} -
{' '} - - )} -
- {variant.price.priceDiscount > 0 ? ( - currencyFormat(variant.price.priceDiscount) - ) : ( - - Call for price - - )} -
- {/* */} -
- - - - -
+ + + + + + + - ))} - -
Part NumberVarianHargaJumlahAction
+ + + {product.variants.map((variant) => ( + + {variant.code} + {variant.attributes.join(', ') || '-'} + + {variant.price.discountPercentage > 0 && + variant.price.priceDiscount > 0 && ( + <> +
+ {currencyFormat(variant.price.price)} +
{' '} + + )} +
+ {variant.price.priceDiscount > 0 ? ( + currencyFormat(variant.price.priceDiscount) + ) : ( + + Call for price + + )} +
+ {/* */} + + + + + + + + + + ))} + + +
- + )}
Informasi Produk
-- cgit v1.2.3