summaryrefslogtreecommitdiff
path: root/src/lib/product/components/ProductCard.jsx
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-08-01 17:07:20 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-08-01 17:07:20 +0700
commit942b4c3548891f25198140b80192e9190a403ee5 (patch)
treef1f4d7ca6d7ff998179cb72e1814b7f65d9b56fe /src/lib/product/components/ProductCard.jsx
parente1c6052ffc9887e792f19f99d900189647845c69 (diff)
flash sale
Diffstat (limited to 'src/lib/product/components/ProductCard.jsx')
-rw-r--r--src/lib/product/components/ProductCard.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index a8964310..c85a76e9 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -3,6 +3,7 @@ import Link from '@/core/components/elements/Link/Link'
import currencyFormat from '@/core/utils/currencyFormat'
import { createSlug } from '@/core/utils/slug'
import whatsappUrl from '@/core/utils/whatsappUrl'
+import ImageNext from 'next/image'
const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
const callForPriceWhatsapp = whatsappUrl('product', {
@@ -101,6 +102,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
</Link>
</div>
<div className='w-8/12 p-2'>
+ {product.flashSale.id > 0 && (
+ <div className='bg-red-600 rounded-full mb-1 p-2 pl-3 pr-3 flex w-fit items-center gap-x-1'>
+ <ImageNext src='/images/ICON_FLASH_SALE_WEBSITE_INDOTEKNIK.svg' width={15} height={10} />
+ <span className='text-white text-xs font-semibold'>FLASH SALE</span>
+ </div>
+ )}
{product?.manufacture?.name ? (
<Link
href={createSlug(