summaryrefslogtreecommitdiff
path: root/src/lib/checkout
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-07-12 06:42:35 +0000
committertrisusilo <tri.susilo@altama.co.id>2024-07-12 06:42:35 +0000
commit1cae9058b3dc4bb3572babdbf0df29539f01d205 (patch)
tree5deaa357b3866b70e706516e28d4ba97b53cbd68 /src/lib/checkout
parenta99bf6480eea556e53b85e6db45f3b8c2361e693 (diff)
parent19f6ce87e9f6e0a5c2cfbae2cf8eabee777f011a (diff)
Merged in Feature/iman-flash-sale (pull request #161)
<iman> update flash sale Approved-by: trisusilo
Diffstat (limited to 'src/lib/checkout')
-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]);