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

Billing history

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