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.

Add dotlink feature flag

Tim Wilson3d39bfcdb3f3
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx
index 447292fea9..2579af3298 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx
@@ -27,6 +27,7 @@ export default function WorkspaceDomainsClient() {
domainsLimit,
exceededDomains,
id: workspaceId,
+ flags,
} = useWorkspace();
const [openPopover, setOpenPopover] = useState(false);
@@ -128,13 +129,15 @@ export default function WorkspaceDomainsClient() {
}
disabled={exceededDomains || !!permissionsError}
/>
- <Button
- text="Claim free .link domain"
- variant="outline"
- icon={<Link className="h-4 w-4" />}
- className="h-9 justify-start px-2"
- onClick={() => setShowRegisterDomainModal(true)}
- />
+ {flags?.dotlink && (
+ <Button
+ text="Claim free .link domain"
+ variant="outline"
+ icon={<Link className="h-4 w-4" />}
+ className="h-9 justify-start px-2"
+ onClick={() => setShowRegisterDomainModal(true)}
+ />
+ )}
</div>
}
align="end"
diff --git a/apps/web/lib/edge-config/get-feature-flags.ts b/apps/web/lib/edge-config/get-feature-flags.ts
index b2de8658ae..844ae0f5ad 100644
--- a/apps/web/lib/edge-config/get-feature-flags.ts
+++ b/apps/web/lib/edge-config/get-feature-flags.ts
@@ -20,6 +20,7 @@ export const getFeatureFlags = async ({
dublink: false,
referrals: false,
webhooks: false,
+ dotlink: false,
};
if (!process.env.NEXT_PUBLIC_IS_DUB || !process.env.EDGE_CONFIG) {
diff --git a/apps/web/lib/types.ts b/apps/web/lib/types.ts
index f7005ea8fb..e5d32b8b0d 100644
--- a/apps/web/lib/types.ts
+++ b/apps/web/lib/types.ts
@@ -80,7 +80,7 @@ export type PlanProps = (typeof plans)[number];
export type RoleProps = (typeof roles)[number];
-export type BetaFeatures = "dublink" | "referrals" | "webhooks";
+export type BetaFeatures = "dublink" | "referrals" | "webhooks" | "dotlink";
export type AddOns = "conversion" | "sso";