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.

Prevent rendering 0 from falsy totalLinks check (#4201)

Pedro Ladeira7709b038827a
diff --git a/apps/web/ui/links/link-display.tsx b/apps/web/ui/links/link-display.tsx
index d38f0a3fb3..23b2195e1d 100644
--- a/apps/web/ui/links/link-display.tsx
+++ b/apps/web/ui/links/link-display.tsx
@@ -80,17 +80,19 @@ export default function LinkDisplay() {
);
})}
</div>
- {totalLinks && totalLinks < SORTABLE_LINKS_LIMIT && (
- <div className="flex h-16 items-center justify-between gap-2 px-4">
- <span className="flex items-center gap-2">
- <ArrowsOppositeDirectionY className="h-4 w-4 text-neutral-800" />
- Ordering
- </span>
- <div>
- <LinkSort />
+ {totalLinks != null &&
+ totalLinks > 0 &&
+ totalLinks < SORTABLE_LINKS_LIMIT && (
+ <div className="flex h-16 items-center justify-between gap-2 px-4">
+ <span className="flex items-center gap-2">
+ <ArrowsOppositeDirectionY className="h-4 w-4 text-neutral-800" />
+ Ordering
+ </span>
+ <div>
+ <LinkSort />
+ </div>
</div>
- </div>
- )}
+ )}
{!isMegaWorkspace && (
<div className="group flex h-16 items-center justify-between gap-2 px-4">
<div className="flex items-center gap-2">