diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-12 13:28:15 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-12 13:28:15 +0700 |
| commit | 8625a9ddf959c131c293254015b59d5cb3b00f55 (patch) | |
| tree | 5ade6d03f7d136cca13fd4bb80fc38814d91ab61 /src/lib/checkout/components | |
| parent | de1bb091b148aa5ef2d5a168e19f1c2dac9e67b0 (diff) | |
<iman? update flash sale
Diffstat (limited to 'src/lib/checkout/components')
| -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 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]); |
