summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-12 13:28:15 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-12 13:28:15 +0700
commit8625a9ddf959c131c293254015b59d5cb3b00f55 (patch)
tree5ade6d03f7d136cca13fd4bb80fc38814d91ab61 /src/lib
parentde1bb091b148aa5ef2d5a168e19f1c2dac9e67b0 (diff)
<iman? update flash sale
Diffstat (limited to 'src/lib')
-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 3c2b8a09..f640299a 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -243,7 +243,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]);