diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-07-12 06:42:35 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-07-12 06:42:35 +0000 |
| commit | 1cae9058b3dc4bb3572babdbf0df29539f01d205 (patch) | |
| tree | 5deaa357b3866b70e706516e28d4ba97b53cbd68 | |
| parent | a99bf6480eea556e53b85e6db45f3b8c2361e693 (diff) | |
| parent | 19f6ce87e9f6e0a5c2cfbae2cf8eabee777f011a (diff) | |
Merged in Feature/iman-flash-sale (pull request #161)
<iman> update flash sale
Approved-by: trisusilo
| -rw-r--r-- | src/lib/checkout/components/Checkout.jsx | 3 |
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]); |
