fix(web): show the register page starting price from live Stripe pricing

Merged
RI
2d ago
+29-9

Why

#1318 added "Paid plans from $14/month after the trial." to /register. That's the monthly USD Solo price, which no longer matches how pricing works: prices load from the plan prices endpoint (#1304) in the visitor's currency, with the regional Solo discount (#1249), and the pricing page defaults to yearly billing shown per month. A visitor whose /pricing shows Solo at €7/mo was told $14.

What changed

  • The amount is a live-price element (data-price-plan = the cheapest plan's Stripe product, data-price-interval="year-monthly"). The page calls initCurrency() from src/scripts/currency.ts, the same code the pricing page uses, so the price always matches /pricing.
  • The HTML keeps the USD yearly-per-month fallback ($12), which is shown if the prices endpoint is unavailable.
  • Copy: "Paid plans from {price}/mo, billed yearly, after the trial.", in line with the homepage teaser's "/mo, billed yearly". The sentence is split around {price} so the amount stays its own element in every translation.

Checks

  • Locally: the line rendered "Paid plans from €7/mo, billed yearly", and /pricing showed Solo at €7 (year-monthly, regional discount from €11).
  • astro check: 0 errors. bun test src/scripts/register.test.ts: 6 pass.

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.