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.

Fix stale pending referral count when switching workspaces (#3640)

Kiran Kbaa5042c82d4
diff --git a/apps/web/lib/swr/use-program-referrals-count.ts b/apps/web/lib/swr/use-program-referrals-count.ts
index 286f6e8c33..74da1785ba 100644
--- a/apps/web/lib/swr/use-program-referrals-count.ts
+++ b/apps/web/lib/swr/use-program-referrals-count.ts
@@ -34,7 +34,7 @@ export function useProgramReferralsCount<T = number>({
);
return {
- data,
+ data: enabled ? data : undefined,
error,
loading: isLoading,
};