Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update page-client.tsx

Kiran K532cfea58a0d
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx
index f19fc64a2c..16d4b4901c 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx
@@ -24,15 +24,17 @@ const INVOICE_TYPES = [
];
export default function WorkspaceInvoicesClient() {
- const { slug, defaultProgramId } = useWorkspace();
+ const { slug } = useWorkspace();
const { searchParams, queryParams } = useRouterStuff();
const selectedInvoiceType = useMemo(() => {
let type = searchParams.get("type");
+
if (type === "payout") {
type = "partnerPayout";
}
- return INVOICE_TYPES.find((t) => t.id === type)!;
+
+ return INVOICE_TYPES.find((t) => t.id === type) || INVOICE_TYPES[0];
}, [searchParams]);
const { data: invoices } = useSWR<InvoiceProps[]>(