The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Improve responsiveness
Tim Wilson545fc891067d
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/activity-list.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/activity-list.tsxindex d05c447c70..17f0596990 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/activity-list.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/activity-list.tsx@@ -50,7 +50,11 @@ export function ActivityList({leads: <LeadDescription event={e} />,sales: <SaleDescription event={e} />,}[event],- right: timeAgo(new Date(e.timestamp), { withAgo: true }),+ right: (+ <div className="whitespace-nowrap">+ {timeAgo(new Date(e.timestamp), { withAgo: true })}+ </div>+ ),};})}onPrevious={() =>@@ -69,24 +73,24 @@ function ClickDescription({event: z.infer<typeof clickEventEnrichedSchema>;}) {return (- <div className="flex items-center gap-2">- <p>Someone from</p>- {event.country ? (- <img- alt={event.country}- src={`https://flag.vercel.app/m/${event.country}.svg`}- className="h-3 w-5"- />- ) : (- <Globe className="size-3 text-gray-700" />- )}- <p>+ <>+ Someone from{" "}+ <div className="mx-1 inline-block">+ {event.country ? (+ <img+ alt={event.country}+ src={`https://flag.vercel.app/m/${event.country}.svg`}+ className="-mt-px inline-block h-3 w-4"+ />+ ) : (+ <Globe className="inline-block size-3 text-gray-700" />+ )}{" "}<span className="font-semibold text-gray-700">{event.country ? COUNTRIES[event.country] : "Planet Earth"}</span>{" "}- clicked on your link- </p>- </div>+ </div>+ clicked on your link+ </>);}@@ -96,24 +100,24 @@ function LeadDescription({event: z.infer<typeof leadEventEnrichedSchema>;}) {return (- <div className="flex items-center gap-2">- <p>Someone from</p>- {event.country ? (- <img- alt={event.country}- src={`https://flag.vercel.app/m/${event.country}.svg`}- className="h-3 w-5"- />- ) : (- <Globe className="size-3 text-gray-700" />- )}- <p>+ <>+ Someone from{" "}+ <div className="mx-1 inline-block">+ {event.country ? (+ <img+ alt={event.country}+ src={`https://flag.vercel.app/m/${event.country}.svg`}+ className="-mt-px inline-block h-3 w-4"+ />+ ) : (+ <Globe className="inline-block size-3 text-gray-700" />+ )}{" "}<span className="font-semibold text-gray-700">{event.country ? COUNTRIES[event.country] : "Planet Earth"}</span>{" "}- signed up for an account- </p>- </div>+ </div>+ signed up for an account+ </>);}@@ -123,23 +127,23 @@ function SaleDescription({event: z.infer<typeof saleEventEnrichedSchema>;}) {return (- <div className="flex items-center gap-2">- <p>Someone from</p>- {event.country ? (- <img- alt={event.country}- src={`https://flag.vercel.app/m/${event.country}.svg`}- className="h-3 w-5"- />- ) : (- <Globe className="size-3 text-gray-700" />- )}- <p>+ <>+ Someone from{" "}+ <div className="mx-1 inline-block">+ {event.country ? (+ <img+ alt={event.country}+ src={`https://flag.vercel.app/m/${event.country}.svg`}+ className="-mt-px inline-block h-3 w-4"+ />+ ) : (+ <Globe className="inline-block size-3 text-gray-700" />+ )}{" "}<span className="font-semibold text-gray-700">{event.country ? COUNTRIES[event.country] : "Planet Earth"}</span>{" "}- upgraded their account- </p>- </div>+ </div>+ upgraded their account+ </>);}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/invite-button.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/invite-button.tsxindex cb2c1ae270..8fb9847778 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/invite-button.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/invite-button.tsx@@ -4,7 +4,8 @@ import { Button } from "@dub/ui";import { Mail } from "lucide-react";const subject = "Create a free account on Dub!";-const body = (url: string) => `Use my referral link to get started: ${url}`;+const body = (url: string) =>+ `Use my referral link to get started with Dub: ${url}`;export function InviteButton({ url }: { url: string }) {return (diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsxindex 8f4c6ebd4a..4a3adcc467 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx@@ -41,53 +41,59 @@ export default async function ReferralsPage({return (<ReferralsPageClient><div>- <div className="relative rounded-xl border border-gray-200 p-9">- <h1 className="text-2xl font-semibold text-black">Refer and earn</h1>+ <div className="relative">+ <div className="rounded-xl border border-gray-200 p-4 sm:p-9">+ <h1 className="text-xl font-semibold text-black sm:text-2xl">+ Refer and earn+ </h1>- {/* Benefits */}- <div className="mt-6 flex flex-col gap-6">- {[- {- title: "10% recurring revenue",- description: "per paying customer (up to 1 year)",- },- {- title: "500 extra clicks quota per month",- description: "per signup (up to 16,000 total)",- },- ].map(({ title, description }) => (- <div className="flex items-center gap-3">- <div className="flex size-9 items-center justify-center rounded-full border border-gray-200 bg-gradient-to-t from-gray-100 to-white">- <div className="rounded-full bg-green-500 p-0.5">- <Check className="size-3.5 text-white" />+ {/* Benefits */}+ <div className="mt-6 flex flex-col gap-6">+ {[+ {+ title: "10% recurring revenue",+ description: "per paying customer (up to 1 year)",+ },+ {+ title: "500 extra clicks quota per month",+ description: "per signup (up to 16,000 total)",+ },+ ].map(({ title, description }) => (+ <div className="flex items-center gap-3">+ <div className="flex size-9 items-center justify-center rounded-full border border-gray-200 bg-gradient-to-t from-gray-100 to-white">+ <div className="rounded-full bg-green-500 p-0.5">+ <Check className="size-3.5 text-white" />+ </div>+ </div>+ <div>+ <p className="text-base font-medium text-gray-800">+ {title}+ </p>+ <p className="text-xs text-gray-500">{description}</p></div></div>- <div>- <p className="text-base font-medium text-gray-800">{title}</p>- <p className="text-xs text-gray-500">{description}</p>- </div>- </div>- ))}- </div>+ ))}+ </div>- {/* Referral link + invite button */}- <div className="mt-8 grid gap-1.5">- <p className="text-xs text-gray-500">Referral Link</p>- <div className="grid max-w-md grid-cols-[1fr_auto] gap-x-2">- <div className="flex h-9 items-center justify-between gap-x-2 rounded-lg border border-gray-300 bg-white py-1.5 pl-4 pr-2">- <p className="text-sm text-gray-500">{getPrettyUrl(link)}</p>- <CopyButton- value={link}- variant="neutral"- className="p-1.5 text-gray-500"- />+ {/* Referral link + invite button */}+ <div className="mt-8 grid gap-1.5">+ <p className="text-xs text-gray-500">Referral Link</p>+ <div className="grid grid-cols-1 gap-x-2 gap-y-2 sm:max-w-sm sm:grid-cols-[1fr_auto] xl:max-w-md">+ <div className="flex h-9 items-center justify-between gap-x-2 rounded-lg border border-gray-300 bg-white py-1.5 pl-4 pr-2">+ <p className="text-sm text-gray-500">{getPrettyUrl(link)}</p>+ <CopyButton+ value={link}+ variant="neutral"+ className="p-1.5 text-gray-500"+ />+ </div>+ <InviteButton url={link} /></div>- <InviteButton url={link} /></div></div>{/* Powered by Dub Conversions */}- <div className="absolute bottom-4 right-4 flex items-center gap-2 rounded-lg border border-gray-100 bg-white p-2 drop-shadow-sm">+ <div className="mt-2 flex items-center justify-center gap-2 rounded-lg border-gray-100 bg-white p-2 md:absolute md:bottom-3 md:right-3 md:mt-0 md:translate-x-0 md:border md:drop-shadow-sm"><Logo className="size-4" /><p className="text-xs text-gray-800">Powered by <span className="font-medium">Dub Conversions</span>@@ -95,7 +101,7 @@ export default async function ReferralsPage({</div></div><div className="mt-12">- <div className="mb-5 flex items-end justify-between">+ <div className="mb-5 flex flex-wrap items-end justify-between gap-4"><h2 className="text-xl font-semibold text-gray-800">Activity</h2><EventTabs event={event} /></div>diff --git a/apps/web/ui/blocks/event-list.tsx b/apps/web/ui/blocks/event-list.tsxindex d254593c4d..af3d218286 100644--- a/apps/web/ui/blocks/event-list.tsx+++ b/apps/web/ui/blocks/event-list.tsx@@ -29,7 +29,7 @@ export function EventList({{events.map((event, index) => (<divkey={index}- className="flex items-center justify-between px-3.5 py-4"+ className="flex items-center justify-between gap-5 px-3.5 py-4"><div className="flex items-center gap-2.5 text-gray-500"><div>{event.icon}</div>