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.

Ensure customerId is defined before customer

Kiran K9fe95f117eb9
diff --git a/apps/web/lib/swr/use-partner-customer.ts b/apps/web/lib/swr/use-partner-customer.ts
index d9b3a7ca29..a0bf0d4158 100644
--- a/apps/web/lib/swr/use-partner-customer.ts
+++ b/apps/web/lib/swr/use-partner-customer.ts
@@ -12,6 +12,7 @@ export default function usePartnerCustomer({
const { data, isLoading } = useSWR<PartnerProfileCustomerProps>(
programSlug &&
+ customerId &&
`/api/partner-profile/programs/${programSlug}/customers/${customerId}`,
fetcher,
);