The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add default badge
Kiran K4b25af0790bb
diff --git a/apps/web/ui/folders/folder-actions.tsx b/apps/web/ui/folders/folder-actions.tsxindex c82ee9348a..8cf4424cd9 100644--- a/apps/web/ui/folders/folder-actions.tsx+++ b/apps/web/ui/folders/folder-actions.tsx@@ -23,7 +23,6 @@ import { Chart, Delete, ThreeDots } from "../shared/icons";import { useFolderPermissionsPanel } from "./folder-permissions-panel";// TODO:-// If no actions button exists, then hide the popover// Re-render when default folder changesexport const FolderActions = ({diff --git a/apps/web/ui/folders/folder-card.tsx b/apps/web/ui/folders/folder-card.tsxindex e988c80321..7ead71f29c 100644--- a/apps/web/ui/folders/folder-card.tsx+++ b/apps/web/ui/folders/folder-card.tsx@@ -30,9 +30,8 @@ export const FolderCard = ({ folder }: { folder: Folder }) => {);const unsortedLinks = folder.id === "unsorted";- const isDefault = defaultFolderId && folder.id === defaultFolderId;-- // TODO: Add "Default" badge to the folder card+ const folderId = unsortedLinks ? null : folder.id;+ const isDefault = folderId === defaultFolderId;return (<div@@ -48,14 +47,14 @@ export const FolderCard = ({ folder }: { folder: Folder }) => {<div className="flex items-center justify-between"><FolderIcon folder={folder} /><div className="relative flex items-center justify-end gap-1">- {!unsortedLinks && !isPermissionsLoading && !canCreateLinks && (- <RequestFolderEditAccessButton- folderId={folder.id}- workspaceId={workspaceId!}- />- )}- <FolderActions folder={folder} />- </div>+ {!unsortedLinks && !isPermissionsLoading && !canCreateLinks && (+ <RequestFolderEditAccessButton+ folderId={folder.id}+ workspaceId={workspaceId!}+ />+ )}+ <FolderActions folder={folder} />+ </div></div><div>@@ -67,6 +66,12 @@ export const FolderCard = ({ folder }: { folder: Folder }) => {<div className="text-xs font-normal text-black">Unsorted</div></div>)}++ {isDefault && (+ <div className="rounded bg-blue-100 p-1">+ <div className="text-xs font-normal text-blue-700">Default</div>+ </div>+ )}</span>{folder.type !== "mega" && <LinksCount folderId={folder.id} />}