feat: enhance API response handling and add new components for module management
This commit is contained in:
@@ -35,10 +35,12 @@ export default async function PaymentsPage({ params }: PageProps) {
|
||||
|
||||
const api = createFinanceApi(client);
|
||||
|
||||
const [batches, invoices] = await Promise.all([
|
||||
const [batchesResult, invoicesResult] = await Promise.all([
|
||||
api.listBatches(acct.id),
|
||||
api.listInvoices(acct.id),
|
||||
]);
|
||||
const batches = batchesResult.data;
|
||||
const invoices = invoicesResult.data;
|
||||
|
||||
const paidInvoices = invoices.filter(
|
||||
(inv: Record<string, unknown>) => inv.status === 'paid',
|
||||
|
||||
Reference in New Issue
Block a user