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.

throw 404 if customer not found

Steven Teye2bfc72857c7
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
index c32bef2d76..253aa46ecb 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/customers/[customerId]/page-client.tsx
@@ -25,11 +25,7 @@ export function CustomerPageClient() {
const { customerId } = useParams<{ customerId: string }>();
const { id: workspaceId, slug } = useWorkspace();
- const {
- data: customer,
- isLoading,
- error,
- } = useCustomer<CustomerEnriched>({
+ const { data: customer, isLoading } = useCustomer<CustomerEnriched>({
customerId,
query: { includeExpandedFields: true },
});
@@ -41,7 +37,7 @@ export function CustomerPageClient() {
fetcher,
);
- if (!customer && !isLoading && !error) notFound();
+ if (!customer && !isLoading) notFound();
return (
<div className="mb-10 mt-2">