import { formatIDR } from '@/utils' import { HiClipboardDocumentList, HiShare } from 'react-icons/hi2' import { toast } from 'react-toastify' export default function VoucherCard(props) { const { item: { voucher, quantity, share_word }, } = props const handleShare = () => { console.log(share_word) if (navigator.canShare) { navigator.share({ title: 'Hai Baru beli voucher baru nih', text: share_word, }) return } navigator.clipboard.writeText(share_word) toast.info('copied to clipboard') return } const handleCopyToClipboard = (text) => { toast.info('copied to clipboard') navigator.clipboard.writeText(text) } return (