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 project card count infinite loading state

Steven Tey6eea6a92aff1
diff --git a/components/app/project-card.tsx b/components/app/project-card.tsx
index 00e8712e93..38c5bf2528 100644
--- a/components/app/project-card.tsx
+++ b/components/app/project-card.tsx
@@ -18,7 +18,7 @@ export default function ProjectCard({
domainVerified,
}: ProjectProps) {
const { data: count } = useSWR<number>(
- domainVerified && `/api/projects/${slug}/domains/${domain}/links/count`,
+ `/api/projects/${slug}/domains/${domain}/links/count`,
fetcher,
);
return (
@@ -66,7 +66,7 @@ export default function ProjectCard({
</div>
<div className="flex items-center space-x-2">
<LinkIcon className="h-5 w-5 text-gray-600" />
- {count ? (
+ {count || count === 0 ? (
<h2 className="text-lg font-medium text-gray-700">
{nFormatter(count)}
</h2>