import { formatIDR } from '@/utils'
import { router } from '@inertiajs/react'
import { useState } from 'react'
const ExchangeModal = ({ show, voucher, setShow }) => {
return (
setShow(false)}
>
{voucher.location.name}
{voucher.profile}
{formatIDR(voucher.price_coin)} Coin
{voucher.display_quota}
{voucher.display_expired}
router.get(
route(
'customer.coin.exchange.process',
voucher
)
)
}
>
Tukarkan
Batal
)
}
export default function VoucherCard({ voucher }) {
const [show, setShow] = useState(false)
return (
<>
setShow(true)}
>
{voucher.location.name}
{voucher.profile}
{formatIDR(voucher.price_coin)} Coin
{voucher.display_quota}
{voucher.display_expired}
>
)
}