summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-12 13:34:56 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-12 13:34:56 +0700
commit19f6ce87e9f6e0a5c2cfbae2cf8eabee777f011a (patch)
tree5deaa357b3866b70e706516e28d4ba97b53cbd68 /src
parenta99bf6480eea556e53b85e6db45f3b8c2361e693 (diff)
<iman> update flash sale
Diffstat (limited to 'src')
-rw-r--r--src/lib/checkout/components/Checkout.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 4aafdece..77c3590b 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -225,7 +225,8 @@ const Checkout = () => {
setProducts(cartCheckout?.products);
setCheckWeight(cartCheckout?.hasProductWithoutWeight);
setTotalWeight(cartCheckout?.totalWeight.g);
- setHasFlashSale(cartCheckout?.products[0]?.hasFlashsale ? cartCheckout.products[0].hasFlashsale : false);
+ const hasFlashSale = cartCheckout?.products.some(product => product.hasFlashsale);
+ setHasFlashSale(hasFlashSale);
}, [cartCheckout]);