diff options
Diffstat (limited to 'src-migrate/modules/product-detail/components/AddToQuotation.tsx')
| -rw-r--r-- | src-migrate/modules/product-detail/components/AddToQuotation.tsx | 22 |
1 files changed, 11 insertions, 11 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} |
