import useSubscription from "../../hooks/use-subscription"; export default function BillingHistory() { const { payments } = useSubscription(); if (payments.length === 0) { return null; } return (

Billing history

{payments.map((payment) => ( ))}
Date Amount Status View receipt
{Intl.NumberFormat(undefined, { style: "currency", currency: payment.currency, currencyDisplay: "narrowSymbol", }).format(payment.amount)} {payment.is_paid === 1 ? "Paid" : "Upcoming"} {typeof payment.receipt_url !== "undefined" ? ( View receipt ) : null}
); }