From d2fb20c30fa3440369807c05d01897eb19483f4c Mon Sep 17 00:00:00 2001 From: FIN-IT_AndriFP Date: Mon, 8 Dec 2025 14:55:49 +0700 Subject: (andri) modal compare without data --- .../product-detail/components/PriceAction.tsx | 38 ++++++---------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'src-migrate/modules/product-detail/components/PriceAction.tsx') diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx index d73ab5f6..ee8009ef 100644 --- a/src-migrate/modules/product-detail/components/PriceAction.tsx +++ b/src-migrate/modules/product-detail/components/PriceAction.tsx @@ -1,5 +1,4 @@ import style from '../styles/price-action.module.css'; - import Image from 'next/image'; import Link from 'next/link'; import { useEffect, useState } from 'react'; @@ -15,14 +14,17 @@ import { Button, Skeleton } from '@chakra-ui/react'; import DesktopView from '@/core/components/views/DesktopView'; import MobileView from '@/core/components/views/MobileView'; +// 1. Tambahkan onCompare (Optional) di sini type Props = { product: IProductDetail; + onCompare?: () => void; }; const PPN: number = process.env.NEXT_PUBLIC_PPN ? parseFloat(process.env.NEXT_PUBLIC_PPN) : 0; -const PriceAction = ({ product }: Props) => { + +const PriceAction = ({ product, onCompare }: Props) => { const { activePrice, setActive, @@ -146,19 +148,6 @@ const PriceAction = ({ product }: Props) => { )} - {/* {!!activePrice && activePrice.price === 0 && ( - - Hubungi kami untuk dapatkan harga terbaik,{' '} - - klik disini - - - )} */} -
@@ -227,9 +216,6 @@ const PriceAction = ({ product }: Props) => { )}
- {/* - * {qtyPickUp} barang bisa di pickup - */}
{/* ===== MOBILE: grid kiri-kanan, kanan hanya qty ===== */} @@ -263,12 +249,6 @@ const PriceAction = ({ product }: Props) => { )} - - {/* {qtyPickUp > 0 && ( -
- * {qtyPickUp} barang bisa di pickup -
- )} */} {/* Kanan: hanya qty, rata kanan */} @@ -295,9 +275,9 @@ const PriceAction = ({ product }: Props) => { value={quantityInput} onChange={(e) => setQuantityInput(e.target.value)} className='h-11 md:h-12 w-16 md:w-20 text-center text-lg md:text-xl outline-none border-x - [appearance:textfield] - [&::-webkit-outer-spin-button]:appearance-none - [&::-webkit-inner-spin-button]:appearance-none' + [appearance:textfield] + [&::-webkit-outer-spin-button]:appearance-none + [&::-webkit-inner-spin-button]:appearance-none' disabled={!hasPrice} /> @@ -335,11 +315,13 @@ const PriceAction = ({ product }: Props) => { )}
+ {/* 2. TERUSKAN onCompare KE SINI */}
@@ -376,4 +358,4 @@ const PriceAction = ({ product }: Props) => { ); }; -export default PriceAction; +export default PriceAction; \ No newline at end of file -- cgit v1.2.3