From f0df1a21f6a53baa12a7e44300ac2035adeb7f53 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Wed, 4 Oct 2023 12:05:14 +0700 Subject: mobile version --- src/lib/cart/components/Cart.jsx | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'src/lib/cart') diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index acd23af6..5716d01b 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -32,7 +32,7 @@ const Cart = () => { const [cart, setCart] = useState(null) - const {setRefreshCart} = useProductCartContext() + const { setRefreshCart } = useProductCartContext() useEffect(() => { if (!auth) return @@ -115,7 +115,7 @@ const Cart = () => { selected: true }).then(() => { getCart().then(() => { - if(promotionActiveId){ + if (promotionActiveId) { setPromotionType(false) } }) @@ -438,7 +438,7 @@ const Cart = () => { product.program.items && product.program.items.map((item) => (
- + { - {product?.hasFlashsale && ( -
-
- {currencyFormat(product?.price?.price)} + {product?.hasFlashsale ? ( + <> +
+
+ {currencyFormat(product?.price?.price)} +
+
+ {product?.price?.discountPercentage}% +
-
- {product?.price?.discountPercentage}% +
+ {currencyFormat(product?.price?.priceDiscount)}
+ + ) : ( +
+ {currencyFormat(product?.price?.price)}
)} -
- {currencyFormat(product?.price?.priceDiscount)} -
-- cgit v1.2.3