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.

Show the count error in the Programs grid like the table

Rafi64ee1e9558d7
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/page-client.tsx
index 2963bcd2a7..e93688eb64 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/page-client.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/page-client.tsx
@@ -180,7 +180,12 @@ function ProgramsTabContent({
countError={countError}
/>
) : (
- <ProgramsGrid tab={tab} search={search} count={count} />
+ <ProgramsGrid
+ tab={tab}
+ search={search}
+ count={count}
+ countError={countError}
+ />
);
}
@@ -198,15 +203,18 @@ function ProgramsGrid({
tab,
search,
count,
+ countError,
}: {
tab: ProgramTab;
search?: string;
count?: number;
+ countError?: unknown;
}) {
const { programEnrollments, isLoading, error, pagination, setPagination } =
useProgramsPage({ tab, search });
- if (error) {
+ // like the table, since without the count the grid cannot show its pages
+ if (error || countError) {
return (
<div className="py-10 text-center text-sm text-neutral-500">
Failed to load programs