The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
improved CTA
Steven Teyec93112a8963
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsxindex 3f6cd97606..ae73d63436 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx@@ -77,29 +77,53 @@ export default function ProjectBillingClient() {<><Confetti active={confetti} config={{ elementCount: 200, spread: 90 }} /><div className="rounded-lg border border-gray-200 bg-white">- <div className="flex flex-col space-y-3 p-10">- <h2 className="text-xl font-medium">Plan & Usage</h2>- <p className="text-sm text-gray-500">- You are currently on the{" "}- {plan ? (- <PlanBadge plan={plan} />- ) : (- <span className="rounded-full bg-gray-200 px-2 py-0.5 text-xs text-gray-200">- load- </span>- )}{" "}- plan.- {billingStart && billingEnd && (- <>- {" "}- Current billing cycle:{" "}- <span className="font-medium text-black">- {billingStart} - {billingEnd}+ <div className="flex flex-col items-start justify-between space-y-4 p-10 xl:flex-row xl:space-y-0">+ <div className="flex flex-col space-y-3">+ <h2 className="text-xl font-medium">Plan & Usage</h2>+ <p className="text-sm text-gray-500">+ You are currently on the{" "}+ {plan ? (+ <PlanBadge plan={plan} />+ ) : (+ <span className="rounded-full bg-gray-200 px-2 py-0.5 text-xs text-gray-200">+ load</span>- .- </>- )}- </p>+ )}{" "}+ plan.+ {billingStart && billingEnd && (+ <>+ {" "}+ Current billing cycle:{" "}+ <span className="font-medium text-black">+ {billingStart} - {billingEnd}+ </span>+ .+ </>+ )}+ </p>+ </div>+ <div>+ <Button+ text="Manage Subscription"+ variant="secondary"+ className="h-9"+ onClick={() => {+ setClicked(true);+ fetch(`/api/projects/${slug}/billing/manage`, {+ method: "POST",+ })+ .then(async (res) => {+ const url = await res.json();+ router.push(url);+ })+ .catch((err) => {+ alert(err);+ setClicked(false);+ });+ }}+ loading={clicked}+ />+ </div></div><div className="grid divide-y divide-gray-200 border-y border-gray-200"><UsageCategory@@ -145,7 +169,7 @@ export default function ProjectBillingClient() {/></div></div>- <div className="flex flex-col items-center justify-between space-y-3 px-10 py-4 text-center sm:flex-row sm:space-y-0 sm:text-left">+ <div className="flex flex-col items-center justify-between space-y-3 px-10 py-4 text-center md:flex-row md:space-y-0 md:text-left">{plan ? (<p className="text-sm text-gray-500">{plan === "enterprise"@@ -159,19 +183,7 @@ export default function ProjectBillingClient() {)}<div>{plan ? (- plan === "free" ? (- <Button- text="Upgrade"- onClick={() =>- queryParams({- set: {- upgrade: "pro",- },- })- }- variant="success"- />- ) : plan === "business max" ? (+ plan === "business max" ? (<ahref={`${HOME_DOMAIN}/enterprise`}target="_blank"@@ -181,22 +193,15 @@ export default function ProjectBillingClient() {</a>) : (<Button- text="Manage Subscription"- onClick={() => {- setClicked(true);- fetch(`/api/projects/${slug}/billing/manage`, {- method: "POST",+ text={`Upgrade to ${nextPlan.name}`}+ onClick={() =>+ queryParams({+ set: {+ upgrade: nextPlan.name.toLowerCase(),+ },})- .then(async (res) => {- const url = await res.json();- router.push(url);- })- .catch((err) => {- alert(err);- setClicked(false);- });- }}- loading={clicked}+ }+ variant="success"/>)) : (diff --git a/apps/web/ui/layout/settings-layout.tsx b/apps/web/ui/layout/settings-layout.tsxindex f31e9c8c7c..796e50a5eb 100644--- a/apps/web/ui/layout/settings-layout.tsx+++ b/apps/web/ui/layout/settings-layout.tsx@@ -21,13 +21,13 @@ export default function SettingsLayout({</div></MaxWidthWrapper></div>- <MaxWidthWrapper className="grid items-start gap-5 py-10 md:grid-cols-5">- <div className="top-36 flex gap-1 md:sticky md:grid">+ <MaxWidthWrapper className="grid items-start gap-5 py-10 lg:grid-cols-5">+ <div className="top-36 flex gap-1 lg:sticky lg:grid">{tabs.map(({ name, segment }) => (<NavLink segment={segment}>{name}</NavLink>))}</div>- <div className="grid gap-5 md:col-span-4">{children}</div>+ <div className="grid gap-5 lg:col-span-4">{children}</div></MaxWidthWrapper></div>);diff --git a/packages/ui/src/badge.tsx b/packages/ui/src/badge.tsxindex a87a443d57..59aca4154c 100644--- a/packages/ui/src/badge.tsx+++ b/packages/ui/src/badge.tsx@@ -2,7 +2,7 @@ import { cn } from "@dub/utils";import { cva, type VariantProps } from "class-variance-authority";const badgeVariants = cva(- "max-w-fit rounded-full border px-2 py-px text-xs font-medium capitalize",+ "max-w-fit rounded-full border px-2 py-px text-xs font-medium capitalize whitespace-nowrap",{variants: {variant: {