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.

Merge branch 'main' into ai-link-creation

flooorianflo418a6b0522e2
diff --cc apps/web/ui/modals/add-edit-link-modal/og-section.tsx
index 75247df329,f324da44cf..94be949ec2
--- a/apps/web/ui/modals/add-edit-link-modal/og-section.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/og-section.tsx
@@@ -11,8 -10,10 +11,9 @@@ import
SimpleTooltipContent,
Switch,
Unsplash,
- useRouterStuff,
} from "@dub/ui";
- import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "@dub/utils";
+ import { TooltipContent } from "@dub/ui/src/tooltip";
+ import { FADE_IN_ANIMATION_SETTINGS } from "@dub/utils";
import { motion } from "framer-motion";
import { Link2 } from "lucide-react";
import { Dispatch, SetStateAction, useEffect, useState } from "react";
@@@ -155,6 -95,29 +156,29 @@@ export default function OGSection(
<Switch
fn={() => setData((prev) => ({ ...prev, proxy: !proxy }))}
checked={proxy}
+ // custom social media cards is only available on Dub's Pro plan
+ {...((!plan || plan === "free") && !proxy
+ ? {
+ disabledTooltip: (
+ <TooltipContent
+ title={`Custom Social Media Cards is only available on ${process.env.NEXT_PUBLIC_APP_NAME}'s Pro plan. Upgrade to Pro to use this feature.`}
+ cta="Upgrade to Pro"
+ {...(plan === "free"
+ ? {
+ onClick: () =>
+ queryParams({
+ set: {
+ upgrade: "pro",
+ },
+ }),
+ }
+ : {
- href: "https://dub.co/pricing",
++ href: `${HOME_DOMAIN}/pricing`,
+ })}
+ />
+ ),
+ }
+ : {})}
/>
</div>