import { IoChevronBack, IoChevronForward } from "react-icons/io5"; import clsx from "clsx"; import usePaymentsHistory from "../../hooks/use-payments-history"; export default function BillingHistory() { const { payments, count, skip, pagesNumber, currentPage, lastPage, hasPreviousPage, hasNextPage, goToPreviousPage, goToNextPage, setPage, } = usePaymentsHistory(); 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}

Page {currentPage} of{" "} {lastPage}

Showing {skip + 1} to{" "} {skip + payments.length} of{" "} {count} results

); }