The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fixed tooltip z-index issue, added links to help center from tooltips
Steven Teyca9a6c82b8ce
diff --git a/app/ui/modal.tsx b/app/ui/modal.tsxindex 65e2703824..e81b3114e1 100644--- a/app/ui/modal.tsx+++ b/app/ui/modal.tsx@@ -41,32 +41,35 @@ export default function Modal({};const { isMobile } = useMediaQuery();- return isMobile ? (- <Drawer.Root- open={setShowModal ? showModal : true}- onOpenChange={(open) => {- if (!open) {- closeModal({ dragged: true });- }- }}- >- <Drawer.Overlay className="fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur" />- <Drawer.Portal>- <Drawer.Content- className={cn(- "fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",- className,- )}- >- <div className="sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit">- <div className="my-3 h-1 w-12 rounded-full bg-gray-300" />- </div>- {children}- </Drawer.Content>- <Drawer.Overlay />- </Drawer.Portal>- </Drawer.Root>- ) : (+ if (isMobile) {+ return (+ <Drawer.Root+ open={setShowModal ? showModal : true}+ onOpenChange={(open) => {+ if (!open) {+ closeModal({ dragged: true });+ }+ }}+ >+ <Drawer.Overlay className="fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur" />+ <Drawer.Portal>+ <Drawer.Content+ className={cn(+ "fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",+ className,+ )}+ >+ <div className="sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit">+ <div className="my-3 h-1 w-12 rounded-full bg-gray-300" />+ </div>+ {children}+ </Drawer.Content>+ <Drawer.Overlay />+ </Drawer.Portal>+ </Drawer.Root>+ );+ }+ return (<Dialog.Rootopen={setShowModal ? showModal : true}onOpenChange={(open) => {@@ -78,14 +81,13 @@ export default function Modal({<Dialog.Portal><Dialog.Overlayid="modal-backdrop"- className="fixed inset-0 z-40 animate-fade-in bg-gray-100 bg-opacity-50 backdrop-blur-md"+ className="fixed inset-0 z-40 hidden animate-fade-in bg-gray-100 bg-opacity-50 backdrop-blur-md md:block"/><Dialog.ContentonOpenAutoFocus={(e) => e.preventDefault()}onCloseAutoFocus={(e) => e.preventDefault()}- onInteractOutside={(e) => e.preventDefault()}className={cn(- "fixed inset-0 z-50 m-auto max-h-fit w-full max-w-md animate-scale-in overflow-hidden rounded-2xl border border-gray-200 bg-white p-0 shadow-xl",+ "fixed inset-0 z-50 m-auto hidden max-h-fit w-full max-w-md animate-scale-in overflow-hidden rounded-2xl border border-gray-200 bg-white p-0 shadow-xl md:block",className,)}>diff --git a/app/ui/modals/add-edit-link-modal/android-section.tsx b/app/ui/modals/add-edit-link-modal/android-section.tsxindex ade4ac699f..8169d209ac 100644--- a/app/ui/modals/add-edit-link-modal/android-section.tsx+++ b/app/ui/modals/add-edit-link-modal/android-section.tsx@@ -2,8 +2,8 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function AndroidSection({props,@@ -36,7 +36,15 @@ export default function AndroidSection({<h2 className="text-sm font-medium text-gray-900">Android Targeting</h2>- <InfoTooltip content="Redirect your Android users to a different link (e.g. Google Play Store link for your app)." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Redirect your Android users to a different link."+ cta="Learn more about device targeting."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#device-targeting-ios--android`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/app/ui/modals/add-edit-link-modal/expiration-section.tsx b/app/ui/modals/add-edit-link-modal/expiration-section.tsxindex 1905b75617..25781532eb 100644--- a/app/ui/modals/add-edit-link-modal/expiration-section.tsx+++ b/app/ui/modals/add-edit-link-modal/expiration-section.tsx@@ -3,7 +3,8 @@ import { LinkProps } from "#/lib/types";import { getDateTimeLocal } from "#/lib/utils";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { InfoTooltip } from "#/ui/tooltip";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";+import { HOME_DOMAIN } from "#/lib/constants";export default function ExpirationSection({props,@@ -34,7 +35,15 @@ export default function ExpirationSection({<div className="flex items-center justify-between"><div className="flex items-center justify-between space-x-2"><h2 className="text-sm font-medium text-gray-900">Expiration Date</h2>- <InfoTooltip content="By setting an expiration date, your link will only be accessible until the specified date." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Set an expiration date for your links – after which it won't be accessible."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#expiration-date`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/app/ui/modals/add-edit-link-modal/ios-section.tsx b/app/ui/modals/add-edit-link-modal/ios-section.tsxindex 68d0826154..95b944e2f9 100644--- a/app/ui/modals/add-edit-link-modal/ios-section.tsx+++ b/app/ui/modals/add-edit-link-modal/ios-section.tsx@@ -2,8 +2,8 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function IOSSection({props,@@ -34,7 +34,15 @@ export default function IOSSection({<div className="flex items-center justify-between"><div className="flex items-center justify-between space-x-2"><h2 className="text-sm font-medium text-gray-900">iOS Targeting</h2>- <InfoTooltip content="Redirect your iOS users to a different link (e.g. App Store link for your app)." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Redirect your iOS users to a different link."+ cta="Learn more about device targeting."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#device-targeting-ios--android`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/app/ui/modals/add-edit-link-modal/og-section.tsx b/app/ui/modals/add-edit-link-modal/og-section.tsxindex e119213776..ec5a1ce52e 100644--- a/app/ui/modals/add-edit-link-modal/og-section.tsx+++ b/app/ui/modals/add-edit-link-modal/og-section.tsx@@ -11,8 +11,8 @@ import { UploadCloud } from "@/components/shared/icons";import { LoadingCircle } from "#/ui/icons";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function OGSection({props,@@ -72,7 +72,15 @@ export default function OGSection({<h2 className="text-sm font-medium text-gray-900">Custom Social Media Cards</h2>- <InfoTooltip content="Customize the title, description, and thumbnail image that will be shown when you share this link on social media." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Customize how your links look when shared on social media."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#custom-social-media-cards`}+ />+ }+ /></div><Switchfn={() => setData((prev) => ({ ...prev, proxy: !proxy }))}diff --git a/app/ui/modals/add-edit-link-modal/password-section.tsx b/app/ui/modals/add-edit-link-modal/password-section.tsxindex 0d8bb3ca24..ba18bd5b16 100644--- a/app/ui/modals/add-edit-link-modal/password-section.tsx+++ b/app/ui/modals/add-edit-link-modal/password-section.tsx@@ -2,9 +2,9 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";import { Eye, EyeOff } from "@/components/shared/icons";-import { InfoTooltip } from "#/ui/tooltip";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function PasswordSection({props,@@ -39,7 +39,15 @@ export default function PasswordSection({<h2 className="text-sm font-medium text-gray-900">Password Protection</h2>- <InfoTooltip content="Password protection allows you to restrict access to your link by encrypting it with a password. Only those who know the password will be able to access your link." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Restrict access to your short links by encrypting it with a password."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#password-protection`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/app/ui/modals/add-edit-link-modal/utm-section.tsx b/app/ui/modals/add-edit-link-modal/utm-section.tsxindex 105253b6ed..088f44e22d 100644--- a/app/ui/modals/add-edit-link-modal/utm-section.tsx+++ b/app/ui/modals/add-edit-link-modal/utm-section.tsx@@ -8,8 +8,8 @@ import {getUrlWithoutUTMParams,} from "#/lib/utils";import Switch from "#/ui/switch";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function UTMSection({props,@@ -60,7 +60,15 @@ export default function UTMSection({<div className="flex items-center justify-between"><div className="flex items-center justify-between space-x-2"><h2 className="text-sm font-medium text-gray-900">UTM Builder</h2>- <InfoTooltip content="UTM parameters are tags that will be added to the end of the destination URL. When your link is clicked, the tags are detected and tracked by your analytics software." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Add UTM parameters to your short links for conversion tracking."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#utm-builder`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/app/ui/tooltip.tsx b/app/ui/tooltip.tsxindex 57fdd29157..e3735061bb 100644--- a/app/ui/tooltip.tsx+++ b/app/ui/tooltip.tsx@@ -29,7 +29,7 @@ export default function Tooltip({return (<Drawer.Root><Drawer.Trigger- className={`${fullWidth ? "w-full" : "inline-flex"} sm:hidden`}+ className={`${fullWidth ? "w-full" : "inline-flex"} md:hidden`}onClick={(e) => {e.stopPropagation();}}@@ -60,24 +60,26 @@ export default function Tooltip({return (<TooltipPrimitive.Provider delayDuration={100}><TooltipPrimitive.Root>- <TooltipPrimitive.Trigger className="hidden sm:inline-flex" asChild>+ <TooltipPrimitive.Trigger className="hidden md:inline-flex" asChild>{children}</TooltipPrimitive.Trigger>- <TooltipPrimitive.Portal>- <TooltipPrimitive.Content- sideOffset={8}- side="top"- className="z-50 hidden animate-slide-up-fade items-center overflow-hidden rounded-md border border-gray-100 bg-white shadow-md sm:block"- >- {typeof content === "string" ? (- <div className="block max-w-xs px-4 py-2 text-center text-sm text-gray-700">- {content}- </div>- ) : (- content- )}- </TooltipPrimitive.Content>- </TooltipPrimitive.Portal>+ {/*+ We don't use TooltipPrimitive.Portal here because for some reason it+ prevents you from selecting the contents of a tooltip when used inside a modal+ */}+ <TooltipPrimitive.Content+ sideOffset={8}+ side="top"+ className="z-[99] hidden animate-slide-up-fade items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block"+ >+ {typeof content === "string" ? (+ <div className="block max-w-xs px-4 py-2 text-center text-sm text-gray-700">+ {content}+ </div>+ ) : (+ content+ )}+ </TooltipPrimitive.Content></TooltipPrimitive.Root></TooltipPrimitive.Provider>);@@ -87,20 +89,23 @@ export function TooltipContent({title,cta,href,+ target,onClick,}: {title: string;cta?: string;href?: string;+ target?: string;onClick?: () => void;}) {return (- <div className="flex flex-col items-center space-y-3 p-4 text-center sm:max-w-xs">+ <div className="flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs"><p className="text-sm text-gray-700">{title}</p>{cta &&(href ? (<Linkhref={href}+ {...(target ? { target } : {})}className="mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black">{cta}@@ -117,6 +122,30 @@ export function TooltipContent({);}+export function SimpleTooltipContent({+ title,+ cta,+ href,+}: {+ title: string;+ cta: string;+ href: string;+}) {+ return (+ <div className="max-w-xs px-4 py-2 text-center text-sm text-gray-700">+ {title}{" "}+ <a+ href={href}+ target="_blank"+ rel="noopener noreferrer"+ className="inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800"+ >+ {cta}+ </a>+ </div>+ );+}+export function InfoTooltip({ content }: { content: ReactNode | string }) {return (<Tooltip content={content}>@@ -168,7 +197,7 @@ export function DomainsTooltip({}) {return (<div- className="flex w-full flex-col items-center space-y-2 p-4 sm:w-60"+ className="flex w-full flex-col items-center space-y-2 p-4 md:w-60"onClick={(e) => e.stopPropagation()}><p className="px-2 text-sm text-gray-500">{title}</p>@@ -189,7 +218,7 @@ export function DomainsTooltip({)}<p className="text-sm font-semibold text-gray-500">{slug}</p></div>- <ExternalLink className="h-4 w-4 text-gray-500 sm:invisible sm:group-hover:visible" />+ <ExternalLink className="h-4 w-4 text-gray-500 md:invisible md:group-hover:visible" /></a>))}</div>diff --git a/components/app/modals/add-edit-domain-modal.tsx b/components/app/modals/add-edit-domain-modal.tsxindex 9c1213e11a..210d936e85 100644--- a/components/app/modals/add-edit-domain-modal.tsx+++ b/components/app/modals/add-edit-domain-modal.tsx@@ -209,6 +209,7 @@ function AddEditDomainModal({name="domain"id="domain"required+ autoComplete="off"pattern="[[\p{Letter}\p{Mark}\d-.]+"className={`${domainErrordiff --git a/components/app/modals/add-edit-link-modal/android-section.tsx b/components/app/modals/add-edit-link-modal/android-section.tsxindex ade4ac699f..8169d209ac 100644--- a/components/app/modals/add-edit-link-modal/android-section.tsx+++ b/components/app/modals/add-edit-link-modal/android-section.tsx@@ -2,8 +2,8 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function AndroidSection({props,@@ -36,7 +36,15 @@ export default function AndroidSection({<h2 className="text-sm font-medium text-gray-900">Android Targeting</h2>- <InfoTooltip content="Redirect your Android users to a different link (e.g. Google Play Store link for your app)." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Redirect your Android users to a different link."+ cta="Learn more about device targeting."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#device-targeting-ios--android`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/components/app/modals/add-edit-link-modal/expiration-section.tsx b/components/app/modals/add-edit-link-modal/expiration-section.tsxindex 2a4f1ef594..7125fff0cb 100644--- a/components/app/modals/add-edit-link-modal/expiration-section.tsx+++ b/components/app/modals/add-edit-link-modal/expiration-section.tsx@@ -3,8 +3,8 @@ import { LinkProps } from "#/lib/types";import { getDateTimeLocal } from "#/lib/utils";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function ExpirationSection({props,@@ -35,7 +35,15 @@ export default function ExpirationSection({<div className="flex items-center justify-between"><div className="flex items-center justify-between space-x-2"><h2 className="text-sm font-medium text-gray-900">Expiration Date</h2>- <InfoTooltip content="By setting an expiration date, your link will only be accessible until the specified date." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Set an expiration date for your links – after which it won't be accessible."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#expiration-date`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/components/app/modals/add-edit-link-modal/ios-section.tsx b/components/app/modals/add-edit-link-modal/ios-section.tsxindex 68d0826154..95b944e2f9 100644--- a/components/app/modals/add-edit-link-modal/ios-section.tsx+++ b/components/app/modals/add-edit-link-modal/ios-section.tsx@@ -2,8 +2,8 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function IOSSection({props,@@ -34,7 +34,15 @@ export default function IOSSection({<div className="flex items-center justify-between"><div className="flex items-center justify-between space-x-2"><h2 className="text-sm font-medium text-gray-900">iOS Targeting</h2>- <InfoTooltip content="Redirect your iOS users to a different link (e.g. App Store link for your app)." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Redirect your iOS users to a different link."+ cta="Learn more about device targeting."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#device-targeting-ios--android`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/components/app/modals/add-edit-link-modal/og-section.tsx b/components/app/modals/add-edit-link-modal/og-section.tsxindex e119213776..ec5a1ce52e 100644--- a/components/app/modals/add-edit-link-modal/og-section.tsx+++ b/components/app/modals/add-edit-link-modal/og-section.tsx@@ -11,8 +11,8 @@ import { UploadCloud } from "@/components/shared/icons";import { LoadingCircle } from "#/ui/icons";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function OGSection({props,@@ -72,7 +72,15 @@ export default function OGSection({<h2 className="text-sm font-medium text-gray-900">Custom Social Media Cards</h2>- <InfoTooltip content="Customize the title, description, and thumbnail image that will be shown when you share this link on social media." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Customize how your links look when shared on social media."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#custom-social-media-cards`}+ />+ }+ /></div><Switchfn={() => setData((prev) => ({ ...prev, proxy: !proxy }))}diff --git a/components/app/modals/add-edit-link-modal/password-section.tsx b/components/app/modals/add-edit-link-modal/password-section.tsxindex 0d8bb3ca24..ba18bd5b16 100644--- a/components/app/modals/add-edit-link-modal/password-section.tsx+++ b/components/app/modals/add-edit-link-modal/password-section.tsx@@ -2,9 +2,9 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react";import { LinkProps } from "#/lib/types";import Switch from "#/ui/switch";import { motion } from "framer-motion";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";import { Eye, EyeOff } from "@/components/shared/icons";-import { InfoTooltip } from "#/ui/tooltip";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function PasswordSection({props,@@ -39,7 +39,15 @@ export default function PasswordSection({<h2 className="text-sm font-medium text-gray-900">Password Protection</h2>- <InfoTooltip content="Password protection allows you to restrict access to your link by encrypting it with a password. Only those who know the password will be able to access your link." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Restrict access to your short links by encrypting it with a password."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#password-protection`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/components/app/modals/add-edit-link-modal/tags-section.tsx b/components/app/modals/add-edit-link-modal/tags-section.tsxindex 64fb842c71..fe732211c3 100644--- a/components/app/modals/add-edit-link-modal/tags-section.tsx+++ b/components/app/modals/add-edit-link-modal/tags-section.tsx@@ -15,7 +15,7 @@ import { useRouter } from "next/router";import { toast } from "sonner";import { mutate } from "swr";import { LoadingCircle } from "#/ui/icons";-import Tooltip from "#/ui/tooltip";+import Tooltip, { SimpleTooltipContent } from "#/ui/tooltip";import { HOME_DOMAIN } from "#/lib/constants";export default function TagsSection({@@ -114,20 +114,11 @@ export default function TagsSection({) : (<Tooltipcontent={- <div className="block max-w-xs px-4 py-2 text-center text-sm text-gray-700">- <p>- Tags are used to organize your links in your Dub- dashboard.{" "}- <a- href={`${HOME_DOMAIN}/help/article/how-to-use-tags`}- target="_blank"- rel="noopener noreferrer"- className="text-gray-500 underline underline-offset-4 hover:text-gray-800"- >- Learn more about tags.- </a>- </p>- </div>+ <SimpleTooltipContent+ title="Tags are used to organize your links in your Dub dashboard."+ cta="Learn more about tags."+ href={`${HOME_DOMAIN}/help/article/how-to-use-tags`}+ />}><Tag className="h-4 w-4" />diff --git a/components/app/modals/add-edit-link-modal/utm-section.tsx b/components/app/modals/add-edit-link-modal/utm-section.tsxindex 5a939b6892..e8cc22ea82 100644--- a/components/app/modals/add-edit-link-modal/utm-section.tsx+++ b/components/app/modals/add-edit-link-modal/utm-section.tsx@@ -8,8 +8,8 @@ import {getUrlWithoutUTMParams,} from "#/lib/utils";import Switch from "#/ui/switch";-import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";-import { InfoTooltip } from "#/ui/tooltip";+import { FADE_IN_ANIMATION_SETTINGS, HOME_DOMAIN } from "#/lib/constants";+import { InfoTooltip, SimpleTooltipContent } from "#/ui/tooltip";export default function UTMSection({props,@@ -60,7 +60,15 @@ export default function UTMSection({<div className="flex items-center justify-between"><div className="flex items-center justify-between space-x-2"><h2 className="text-sm font-medium text-gray-900">UTM Builder</h2>- <InfoTooltip content="UTM parameters are tags that will be added to the end of the destination URL. When your link is clicked, the tags are detected and tracked by your analytics software." />+ <InfoTooltip+ content={+ <SimpleTooltipContent+ title="Add UTM parameters to your short links for conversion tracking."+ cta="Learn more."+ href={`${HOME_DOMAIN}/help/article/how-to-create-link#utm-builder`}+ />+ }+ /></div><Switch fn={() => setEnabled(!enabled)} checked={enabled} /></div>diff --git a/pages/app/[slug]/domains.tsx b/pages/app/[slug]/domains.tsxindex 77cbd82b9a..8040e800c5 100644--- a/pages/app/[slug]/domains.tsx+++ b/pages/app/[slug]/domains.tsx@@ -29,6 +29,7 @@ export default function ProjectDomains() {<TooltipContenttitle="Learn more about how to add, configure, and verify custom domains on Dub."href={`${HOME_DOMAIN}/help/article/how-to-add-custom-domain`}+ target="_blank"cta="Learn more"/>}