The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
minor ui fixes, standardize naming
Steven Tey0b13909917b6
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/links/links-settings.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/links/links-settings.tsxindex 62f505956a..9c36f44813 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/links/links-settings.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/links/links-settings.tsx@@ -45,7 +45,7 @@ function LinksSettingsForm({ program }: { program: ProgramProps }) {? getDomainWithoutWWW(program.url): "dub.co";- const linkStructures = [+ const LINK_TYPES = [{label: "Short link",example: `${shortDomain}/steven`,@@ -163,17 +163,17 @@ function LinksSettingsForm({ program }: { program: ProgramProps }) {</div></SettingsRow>- <SettingsRow heading="Link structure">+ <SettingsRow heading="Link type"><div className="grid grid-cols-1 gap-3">- {linkStructures.map((linkStructure, idx) => {+ {LINK_TYPES.map((type, idx) => {const isSelected = idx === 0;return (<label- key={linkStructure.label}+ key={type.label}className={cn("relative flex w-full cursor-pointer items-start gap-0.5 rounded-md border border-neutral-200 bg-white p-3 text-neutral-600",- linkStructure.comingSoon+ type.comingSoon? "cursor-default opacity-80": "hover:bg-neutral-50","transition-all duration-150",@@ -183,19 +183,17 @@ function LinksSettingsForm({ program }: { program: ProgramProps }) {><inputtype="radio"- value={linkStructure.label}+ value={type.label}className="hidden"checked={isSelected}- disabled={linkStructure.comingSoon}+ disabled={type.comingSoon}readOnly/><div className="flex grow flex-col text-sm">- <span className="font-medium">{linkStructure.label}</span>- <span className="text-neutral-600">- {linkStructure.example}- </span>+ <span className="font-medium">{type.label}</span>+ <span className="text-neutral-600">{type.example}</span></div>- {linkStructure.comingSoon ? (+ {type.comingSoon ? (<Badge variant="blueGradient">Coming soon</Badge>) : (<CircleCheckFilldiff --git a/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/form.tsx b/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/form.tsxindex d67bd19c2e..2e5d76b817 100644--- a/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/form.tsx+++ b/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/form.tsx@@ -21,23 +21,22 @@ import { toast } from "sonner";export const LINK_TYPES = [{- value: "short",+ id: "short",label: "Short link",- preview: "refer.dub.co/steven",- disabled: false,+ example: "refer.dub.co/steven",+ comingSoon: false,},{- value: "query",+ id: "query",label: "Query parameter",- preview: "dub.co/?via=steven",- disabled: false,+ example: "dub.co/?via=steven",+ comingSoon: false,},{- value: "dynamic",+ id: "dynamic",label: "Dynamic path",- preview: "dub.co/refer/steven",- disabled: true,- badge: "Coming soon",+ example: "dub.co/refer/steven",+ comingSoon: true,},];@@ -127,7 +126,7 @@ export function Form() {<div className="space-y-6"><div className="space-y-1"><h2 className="text-base font-medium text-neutral-900">- Referral Link+ Referral link</h2><p className="text-sm font-normal text-neutral-600">Set the default referral link domain and destination URL@@ -169,9 +168,7 @@ export function Form() {<div className="space-y-6"><div className="space-y-1">- <h2 className="text-base font-medium text-neutral-900">- Link structure- </h2>+ <h2 className="text-base font-medium text-neutral-900">Link type</h2><p className="text-sm font-normal text-neutral-600">Set how the link shows up in the partner portal</p>@@ -179,25 +176,25 @@ export function Form() {<div className="flex flex-col gap-3">{LINK_TYPES.map((type) => {- const isSelected = watch("linkType") === type.value;+ const isSelected = watch("linkType") === type.id;return (<label- key={type.value}+ key={type.id}className={cn("relative flex w-full cursor-pointer items-start gap-0.5 rounded-md border border-neutral-200 bg-white p-3 text-neutral-600 hover:bg-neutral-50","transition-all duration-150",isSelected &&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",- type.disabled && "cursor-not-allowed hover:bg-white",+ type.comingSoon && "cursor-not-allowed hover:bg-white",)}><inputtype="radio"{...register("linkType")}- value={type.value}+ value={type.id}className="hidden"- disabled={type.disabled}+ disabled={type.comingSoon}/><div className="flex grow flex-col text-sm">@@ -205,18 +202,18 @@ export function Form() {<span className="text-sm font-semibold text-neutral-900">{type.label}</span>- {type.badge && (+ {type.comingSoon && (<Badge variant="blueGradient" size="sm">- {type.badge}+ Coming soon</Badge>)}</div><span className="text-sm font-normal text-neutral-900">- {type.preview}+ {type.example}</span></div>- {!type.disabled && (+ {!type.comingSoon && (<CircleCheckFillclassName={cn("-mr-px -mt-px flex size-4 scale-75 items-center justify-center rounded-full opacity-0 transition-[transform,opacity] duration-150",diff --git a/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/overview/page-client.tsx b/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/overview/page-client.tsxindex 2d3aed7569..cb584962cd 100644--- a/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/overview/page-client.tsx+++ b/apps/web/app/app.dub.co/(new-program)/[slug]/programs/new/overview/page-client.tsx@@ -91,9 +91,9 @@ export function PageClient() {href: `/${workspaceSlug}/programs/new/rewards`,},{- title: "Referral link structure",- content: LINK_TYPES.find((linkType) => linkType.value === data.linkType)- ?.preview,+ title: "Referral link type",+ content: LINK_TYPES.find((linkType) => linkType.id === data.linkType)+ ?.example,href: `/${workspaceSlug}/programs/new`,},{diff --git a/apps/web/app/app.dub.co/(new-program)/header.tsx b/apps/web/app/app.dub.co/(new-program)/header.tsxindex adc2f45477..cb5d466767 100644--- a/apps/web/app/app.dub.co/(new-program)/header.tsx+++ b/apps/web/app/app.dub.co/(new-program)/header.tsx@@ -124,7 +124,7 @@ export function Header() {<Buttontext="Save and exit"variant="secondary"- className="h-7 w-auto"+ className="h-8 w-auto"loading={isPending}onClick={saveAndExit}/>diff --git a/apps/web/ui/layout/sidebar/create-program-card.tsx b/apps/web/ui/layout/sidebar/create-program-card.tsxindex cc0dba4711..dbd53093c1 100644--- a/apps/web/ui/layout/sidebar/create-program-card.tsx+++ b/apps/web/ui/layout/sidebar/create-program-card.tsx@@ -35,6 +35,16 @@ export function CreateProgramCard() {return (<div className="relative mt-6 flex flex-col gap-3 overflow-hidden rounded-lg border bg-white p-3 pt-4">+ <div className="pointer-events-none absolute inset-0 opacity-20">+ <div+ className="h-full w-full"+ style={{+ background:+ "conic-gradient(from 0deg at 50% 50%, #F35066 116.99999570846558deg, #9071F9 180deg, #5182FC 240.00000715255737deg, #F35066 360deg)",+ filter: "blur(60px)",+ }}+ />+ </div><div className="relative flex items-center gap-2"><ConnectedDots4 className="size-4" /></div>