History

Line up plan card buttons by dropping the free-trial blurb (#1198)

The Team card rendered an extra '14-day free trial, then $150 / month' line between the price and the action button, which only trial plans have. That pushed Team's button about a line lower than Free's and Enterprise's, so the row of CTAs no longer lined up. Remove the blurb so every card has the same structure and the buttons share a baseline. The trial is still surfaced: the button itself reads "Start free trial".

Rhys Sullivan committed 4 months ago

Commit 4600a211 parent a7d46031 file · +0 −14Browse files

Unified · Split

apps/cloud/src/routes/app/billing_.plans.tsx+0−14
@@ -66,12 +66,6 @@ const ACTION_LABELS: Record<string, string> = { · 65 unmodified lines
6666
6767 const PLAN_ORDER = ["free", "team", "enterprise"];
6868
69−// "14-day free trial", "1-month free trial", etc. — reads the trial config
70−// synced from the repo-root autumn.config.ts so copy tracks the plan. The unit
71−// stays singular because it reads as a compound adjective ("14-day", "2-month").
72−const trialLabel = (freeTrial: NonNullable<Plan["freeTrial"]>): string =>
73− `${freeTrial.durationLength}-${freeTrial.durationType} free trial`;
74−
7569 function PlansPage() {
7670 const { attach, openCustomerPortal, isLoading: customerLoading } = useCustomer();
7771 const { data: plans, isLoading: plansLoading, isFetching } = useListPlans();
@@ -186,14 +180,6 @@ function PlansPage() { · 108 unmodified lines
186180 )}
187181 </div>
188182
189− {trialOffered && freeTrial && (
190− <p className="mt-2 text-xs font-medium text-primary">
191− {trialLabel(freeTrial)}
192− {plan.price?.amount != null &&
193− `, then $${plan.price.amount} / ${plan.price.interval ?? "month"}`}
194− </p>
195− )}
196−
197183 <div className="mt-4">
198184 {(isCurrent && !isCanceling) || isScheduled ? (
199185 <div className="flex h-9 items-center justify-center rounded-md border border-border bg-muted/30 text-sm font-medium text-muted-foreground">