From 8625a9ddf959c131c293254015b59d5cb3b00f55 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 12 Jul 2024 13:28:15 +0700
Subject: <iman? update flash sale

---
 src/lib/checkout/components/Checkout.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/lib/checkout/components/Checkout.jsx')

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]);
   
 
-- 
cgit v1.2.3

