summaryrefslogtreecommitdiff
path: root/src/lib/cart
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-10-03 17:11:13 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-10-03 17:11:13 +0700
commitdde4c79768532247abae4a1d188c82f2d601fbe0 (patch)
treecdf375735685197ac1fa9af5bd7ceeb8f22fd81f /src/lib/cart
parent787d3aaa3187d3432c8e6b743b555ea3e4a4980c (diff)
check if flashsale in cart
Diffstat (limited to 'src/lib/cart')
-rw-r--r--src/lib/cart/components/Cart.jsx2
-rw-r--r--src/lib/cart/components/Cartheader.jsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx
index b5976a1b..acd23af6 100644
--- a/src/lib/cart/components/Cart.jsx
+++ b/src/lib/cart/components/Cart.jsx
@@ -685,7 +685,7 @@ const Cart = () => {
</td>
<td className='relative'>
<ComponentCanBuy canBuy={product.canBuy} />
- {product?.price?.discountPercentage > 0 && (
+ {product?.hasFlashsale && (
<div className='flex gap-x-1 items-center justify-center mt-3'>
<div className='text-gray_r-11 line-through text-caption-1'>
{currencyFormat(product?.price?.price)}
diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index cbe7c7e1..901b1501 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -204,7 +204,7 @@ const Cardheader = (cartCount) => {
</p>
</Link>
- {product?.price?.discountPercentage > 0 && (
+ {product?.hasFlashsale && (
<div className='flex gap-x-1 items-center mb-2 mt-1'>
<div className='badge-solid-red'>
{product?.price?.discountPercentage}%