import { formatIDR } from '@/utils' import { router } from '@inertiajs/react' export default function VoucherCard({ voucher }) { const addCart = () => { router.post(route('cart.store', voucher)) } return (
{voucher.location.name}
{voucher.profile}
IDR {formatIDR(voucher.price)}
{+voucher.discount !== 0 && (
{voucher.discount}%
{formatIDR(voucher.display_price)}
)}
{voucher.display_quota}
{voucher.display_expired}
) }