summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-migrate/modules/product-detail/components/AddToQuotation.tsx22
-rw-r--r--src-migrate/modules/product-detail/components/ProductComparisonModal.tsx4
2 files changed, 13 insertions, 13 deletions
diff --git a/src-migrate/modules/product-detail/components/AddToQuotation.tsx b/src-migrate/modules/product-detail/components/AddToQuotation.tsx
index 0ea88830..e26e271f 100644
--- a/src-migrate/modules/product-detail/components/AddToQuotation.tsx
+++ b/src-migrate/modules/product-detail/components/AddToQuotation.tsx
@@ -1,8 +1,7 @@
import BottomPopup from '@/core/components/elements/Popup/BottomPopup';
import style from '../styles/price-action.module.css';
-import { Button, Link, useToast, Icon } from '@chakra-ui/react';
-// Pastikan icon ini ada (atau ganti dengan text sementara jika error)
-import { ScaleIcon } from '@heroicons/react/24/outline';
+import { Button, Link, useToast } from '@chakra-ui/react';
+// import { ScaleIcon } from '@heroicons/react/24/outline'; // Tidak perlu lagi
import product from 'next-seo/lib/jsonld/product';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
@@ -26,7 +25,7 @@ type Props = {
quantity?: number;
source?: 'buy' | 'add_to_cart';
products: IProductDetail;
- onCompare?: () => void; // <--- 1. Tambah Props
+ onCompare?: () => void;
};
type Status = 'idle' | 'loading' | 'success';
@@ -36,7 +35,7 @@ const AddToQuotation = ({
quantity = 1,
source = 'add_to_cart',
products,
- onCompare // <--- 2. Tangkap Props
+ onCompare
}: Props) => {
const auth = getAuth();
const router = useRouter();
@@ -112,32 +111,33 @@ const AddToQuotation = ({
}, [status]);
return (
- <div className='w-full flex flex-col gap-3'> {/* Ganti div biasa jadi Flex Column gap 3 */}
+ <div className='w-full flex flex-col gap-3'>
{/* 3. TAMPILAN DESKTOP: GRID 2 KOLOM (Bandingkan & Penawaran) */}
<DesktopView>
<div className="grid grid-cols-2 gap-3 w-full">
{/* Tombol Kiri: Bandingkan */}
<Button
- onClick={onCompare} // <--- Jalankan Modal Compare
+ onClick={onCompare}
variant="outline"
colorScheme="gray"
className="w-full border border-gray-300 p-2 gap-2 flex items-center justify-center text-gray-600 hover:text-red-600 hover:border-red-600 transition-all font-normal text-sm"
>
- <Icon as={ScaleIcon} w={5} h={5} />
+ {/* UPDATE ICON DISINI */}
+ <ImageNext src="/images/logo-bandingkan.svg" width={15} height={15} alt="bandingkan" />
Bandingkan
</Button>
{/* Tombol Kanan: Penawaran (Link WA) */}
<Button
- as={Link}
+ as={Link}
href={askAdminUrl}
target='_blank'
variant="outline"
colorScheme="gray"
className="w-full border border-gray-300 p-2 gap-2 flex items-center justify-center text-gray-600 hover:text-red-600 hover:border-red-600 transition-all font-normal text-sm"
_hover={{ textDecoration: 'none' }}
- onClick={handleButton} // Opsional: Jalankan handleButton jika ingin fungsi tombol ini tetap jalan
+ onClick={handleButton}
>
<ImageNext src="/images/doc_red.svg" width={20} height={20} alt="penawaran" />
Penawaran
@@ -145,7 +145,7 @@ const AddToQuotation = ({
</div>
</DesktopView>
- {/* TAMPILAN MOBILE (Tetap seperti semula - hanya icon Penawaran) */}
+ {/* TAMPILAN MOBILE */}
<MobileView>
<Button
onClick={handleButton}
diff --git a/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx b/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx
index 1190e95d..97f1d101 100644
--- a/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx
+++ b/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx
@@ -315,7 +315,7 @@ const ProductComparisonModal = ({ isOpen, onClose, mainProduct, selectedVariant
<Text color="red.600" fontWeight="bold" fontSize="md">
{product.price > 0 ? formatPrice(product.price) : 'Hubungi Admin'}
</Text>
- <Text fontSize="xs" fontWeight="bold" noOfLines={2} h="35px" title={product.name} mb={2}>
+ <Text fontSize="xs" fontWeight="bold" noOfLines={3} h="45px" title={product.name} mb={2}>
{product.name}
</Text>
</Box>
@@ -407,7 +407,7 @@ const ProductComparisonModal = ({ isOpen, onClose, mainProduct, selectedVariant
<Image
src="/images/no-image-compare.svg"
alt="Empty Slot"
- boxSize="100px"
+ boxSize="125px"
mb={2}
opacity={0.6}
/>