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.

Dub Referrals GA

Steven Tey5823f9c72720
diff --git a/apps/web/lib/embed/constants.ts b/apps/web/lib/embed/constants.ts
index 5bb8f4c89e..0f29254cb9 100644
--- a/apps/web/lib/embed/constants.ts
+++ b/apps/web/lib/embed/constants.ts
@@ -9,6 +9,3 @@ export const REFERRALS_EMBED_PUBLIC_TOKEN_COOKIE_NAME =
// Analytics embed token
export const ANALYTICS_EMBED_PUBLIC_TOKEN_COOKIE_NAME =
"dub_analytics_embed_token";
-
-// TODO REMOVE ONCE WE LAUNCH TO GA
-export const SHOW_EMBEEDED_REFERRALS = false;
diff --git a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
index 237233b988..be3f0543e3 100644
--- a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
@@ -1,6 +1,5 @@
"use client";
-import { SHOW_EMBEEDED_REFERRALS } from "@/lib/embed/constants";
import usePrograms from "@/lib/swr/use-programs";
import { useRouterStuff } from "@dub/ui";
import {
@@ -217,15 +216,11 @@ const NAV_AREAS: SidebarNavAreas<{
icon: ShieldCheck,
href: "/account/settings/security",
},
- ...(SHOW_EMBEEDED_REFERRALS
- ? [
- {
- name: "Referrals",
- icon: Gift,
- href: "/account/settings/referrals",
- },
- ]
- : []),
+ {
+ name: "Referrals",
+ icon: Gift,
+ href: "/account/settings/referrals",
+ },
],
},
],
diff --git a/apps/web/ui/layout/sidebar/refer-button.tsx b/apps/web/ui/layout/sidebar/refer-button.tsx
index 8ab770bfb6..61c1cff260 100644
--- a/apps/web/ui/layout/sidebar/refer-button.tsx
+++ b/apps/web/ui/layout/sidebar/refer-button.tsx
@@ -1,6 +1,5 @@
"use client";
-import { SHOW_EMBEEDED_REFERRALS } from "@/lib/embed/constants";
import { Gift } from "@dub/ui/icons";
import Link from "next/link";
import { usePathname } from "next/navigation";
@@ -8,7 +7,7 @@ import { usePathname } from "next/navigation";
export function ReferButton() {
const pathname = usePathname();
- if (pathname === "/account/settings/referrals" || !SHOW_EMBEEDED_REFERRALS) {
+ if (pathname === "/account/settings/referrals") {
return null;
}
diff --git a/apps/web/ui/layout/sidebar/user-dropdown.tsx b/apps/web/ui/layout/sidebar/user-dropdown.tsx
index dc0906460a..8ee4fb88c4 100644
--- a/apps/web/ui/layout/sidebar/user-dropdown.tsx
+++ b/apps/web/ui/layout/sidebar/user-dropdown.tsx
@@ -1,6 +1,5 @@
"use client";
-import { SHOW_EMBEEDED_REFERRALS } from "@/lib/embed/constants";
import { Avatar, Gift, Icon, Popover, User } from "@dub/ui";
import { cn } from "@dub/utils";
import { LogOut } from "lucide-react";
@@ -38,15 +37,13 @@ export default function UserDropdown() {
href="/account/settings"
onClick={() => setOpenPopover(false)}
/>
- {SHOW_EMBEEDED_REFERRALS && (
- <UserOption
- as={Link}
- label="Refer and earn"
- icon={Gift}
- href="/account/settings/referrals"
- onClick={() => setOpenPopover(false)}
- />
- )}
+ <UserOption
+ as={Link}
+ label="Refer and earn"
+ icon={Gift}
+ href="/account/settings/referrals"
+ onClick={() => setOpenPopover(false)}
+ />
<UserOption
as="button"
type="button"