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.

small fixes

Steven Tey27cdf1c111dd
diff --git a/apps/web/app/api/domains/[domain]/transfer/route.ts b/apps/web/app/api/domains/[domain]/transfer/route.ts
index 9f7ba341e2..cab77def57 100644
--- a/apps/web/app/api/domains/[domain]/transfer/route.ts
+++ b/apps/web/app/api/domains/[domain]/transfer/route.ts
@@ -125,14 +125,20 @@ export const POST = withAuth(
usage: {
decrement: totalLinkClicks,
},
+ linksUsage: {
+ decrement: linksCount,
+ },
},
}),
prisma.project.update({
where: { id: newWorkspaceId },
data: {
- linksUsage: {
+ usage: {
increment: totalLinkClicks,
},
+ linksUsage: {
+ increment: linksCount,
+ },
},
}),
]);
diff --git a/apps/web/ui/domains/domain-card.tsx b/apps/web/ui/domains/domain-card.tsx
index f375c9a5f0..53624c913d 100644
--- a/apps/web/ui/domains/domain-card.tsx
+++ b/apps/web/ui/domains/domain-card.tsx
@@ -15,6 +15,7 @@ import {
LoadingDots,
NumberTooltip,
Popover,
+ SimpleTooltipContent,
useIntersectionObserver,
} from "@dub/ui";
import { capitalize, fetcher, nFormatter, truncate } from "@dub/utils";
@@ -214,6 +215,15 @@ export default function DomainCard({ props }: { props: DomainProps }) {
}}
icon={<FolderInput className="h-4 w-4" />}
className="h-9 justify-start px-2 font-medium"
+ {...(primary && {
+ disabledTooltip: (
+ <SimpleTooltipContent
+ title="You cannot transfer your workspace's primary domain. Set another domain as primary to transfer this domain."
+ cta="Learn more."
+ href="https://dub.co/help/article/how-to-set-primary-domain"
+ />
+ ),
+ })}
/>
<Button
text="Delete"