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.

hide popover if no actions exists

Kiran Ke5d34a4a7f99
diff --git a/apps/web/ui/folders/folder-actions.tsx b/apps/web/ui/folders/folder-actions.tsx
index 7aaa6dfdd3..c82ee9348a 100644
--- a/apps/web/ui/folders/folder-actions.tsx
+++ b/apps/web/ui/folders/folder-actions.tsx
@@ -106,10 +106,15 @@ export const FolderActions = ({
const folderId = folder.id === "unsorted" ? null : folder.id;
const unsortedLinks = folderId === null;
- const isDefault = Boolean(defaultFolderId) && defaultFolderId === folderId;
+ const isDefault = folderId === defaultFolderId;
+ const hidePopover = isDefault && folderId === null;
const canMakeDefault =
!isDefault && !permissionsError && folder.accessLevel != null;
+ if (hidePopover) {
+ return null;
+ }
+
return (
<>
<RenameFolderModal />