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.validate_price)}
{+voucher.discount !== 0 && (
{voucher.discount}%
{formatIDR(voucher.validate_display_price)}
)}
{voucher.display_quota}
{voucher.display_expired}
) }