diff options
| author | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2025-12-23 14:24:08 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2025-12-23 14:24:08 +0700 |
| commit | fe0b9df8823b9508260b1f67b244e69ec5a302a4 (patch) | |
| tree | f71bd88ee4c9d060e8bfe247055f5d005b5393a6 | |
| parent | 190bd5c5f66fc319d91d7ad3979ef8ff125dbd52 (diff) | |
(andri) fix
| -rw-r--r-- | src-migrate/modules/product-detail/components/AddToQuotation.tsx | 22 | ||||
| -rw-r--r-- | src-migrate/modules/product-detail/components/ProductComparisonModal.tsx | 4 |
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} /> |
