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 domain card link id

Steven Teyd73151c9ced5
diff --git a/apps/web/ui/domains/domain-card.tsx b/apps/web/ui/domains/domain-card.tsx
index 83ad270103..4894a770c4 100644
--- a/apps/web/ui/domains/domain-card.tsx
+++ b/apps/web/ui/domains/domain-card.tsx
@@ -291,7 +291,11 @@ function Menu({
const [copiedLinkId, setCopiedLinkId] = useState(false);
const copyLinkId = () => {
- navigator.clipboard.writeText(props.id);
+ if (!linkProps) {
+ toast.error("Link ID not found");
+ return;
+ }
+ navigator.clipboard.writeText(linkProps.id);
setCopiedLinkId(true);
toast.success("Link ID copied!");
setTimeout(() => setCopiedLinkId(false), 3000);
@@ -352,6 +356,9 @@ function Menu({
setShowAddEditLinkModal(true);
}}
icon={<Hyperlink className="h-4 w-4" />}
+ disabledTooltip={
+ !linkProps ? "Retrieving link details..." : undefined
+ }
className="h-9 justify-start px-2 font-medium"
/>
<Button
@@ -362,6 +369,9 @@ function Menu({
setShowLinkQRModal(true);
}}
icon={<QrCode className="h-4 w-4" />}
+ disabledTooltip={
+ !linkProps ? "Retrieving link details..." : undefined
+ }
className="h-9 justify-start px-2 font-medium"
/>
<Button
@@ -375,6 +385,9 @@ function Menu({
<Copy className="h-4 w-4" />
)
}
+ disabledTooltip={
+ !linkProps ? "Retrieving link details..." : undefined
+ }
className="h-9 justify-start px-2 font-medium"
/>
</div>