From 4f5208d1da03f8925807c28cebf3188e7ec29570 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 15 Oct 2025 15:24:47 +0700 Subject: cr renca --- src/lib/product/components/ProductCard.jsx | 74 ++++++++++++++---------------- 1 file changed, 35 insertions(+), 39 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 48eeb506..0ec2a1e6 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -12,7 +12,7 @@ import whatsappUrl from '@/core/utils/whatsappUrl'; import useUtmSource from '~/hooks/useUtmSource'; import useDevice from '@/core/hooks/useDevice'; import { BadgePercent, Tag } from 'lucide-react'; -import { TicketIcon } from '@heroicons/react/24/outline'; +import { TicketIcon } from '@heroicons/react/24/solid'; import DesktopView from '@/core/components/views/DesktopView'; import MobileView from '@/core/components/views/MobileView'; @@ -275,30 +275,37 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { -
+
- {product?.name} +
+ {product?.name} +
{/* PICK UP NOW badge (kanan-atas gambar) */} {product?.isInBu && ( Pick Up Now { {/* BADGE DISKON KIRI-ATAS (tetap seperti punyamu) */} {(product?.lowestPrice?.discountPercentage ?? 0) > 0 && ( -
-
+
+
{Math.floor(product.lowestPrice.discountPercentage)}%
@@ -362,7 +362,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { />
- {/* Old (dibiarkan komentar persis punyamu) */} + {/* Old */} {/*
@@ -399,7 +399,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {product?.manufacture?.name ? ( {product.manufacture.name} @@ -407,14 +407,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { ) : (
-
)} - - {/* (Dihapus yang versi header agar tidak dobel, sesuai instruksi sebelumnya) */}
{product?.name} @@ -448,11 +446,11 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
) : ( // === BLOK ELSE PUNYA KAMU, TIDAK DIUBAH === -
+
{product?.lowestPrice.price > 0 ? ( <> {currencyFormat(product?.lowestPrice.priceDiscount)} -
+
Include PPN:{' '} {currencyFormat( product.lowestPrice.price * @@ -474,25 +472,23 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )} {discount > 0 && (product?.flashSale?.id ?? 0) < 1 && ( -
-
- {/* Label polos (bukan dalam kotak) */} - Pakai Voucher +
+ {/* Label polos (bukan dalam kotak) */} + Voucher - {/* Chip: ikon + nominal */} - - - - {currencyFormat(discount)} - + > + + + {currencyFormat(discount)} -
+
)} -- cgit v1.2.3