Skip to content

Commit

Permalink
Move CTA to separate line
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanoltman committed Nov 21, 2024
1 parent f348503 commit a4fc931
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/components/PricingCalculator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ export function PricingCalculator() {
initialNumPatchesPerMonth,
);
const totalPatchInstalls = mauCount * numPatchesPerMonth;
const [recommendedPlan, helpText, cost] = (() => {
const [recommendedPlan, helpText, cta, cost] = (() => {
if (totalPatchInstalls <= 5_000) {
return [
'Free',
<span>
Our free tier has everything you need.{' '}
<a className="link underline" href="https://console.shorebird.dev">
Sign up
</a>{' '}
here.
</span>,
<span>Our free tier has everything you need. </span>,
<NonEnterpriseCta />,
0,
];
}
Expand All @@ -30,12 +25,9 @@ export function PricingCalculator() {
'Pro',
<span>
Our Pro plan includes {formatNumber(proPlanIncludedPatches)} patch
installs.{' '}
<a className="link underline" href="https://console.shorebird.dev">
Sign up
</a>{' '}
here.
installs.
</span>,
<NonEnterpriseCta />,
2000,
];
}
Expand All @@ -53,26 +45,14 @@ export function PricingCalculator() {
>
configurable overages
</a>{' '}
at $1 per 2,500 patch installs.{' '}
<a className="link underline" href="https://console.shorebird.dev">
Sign up
</a>{' '}
here.
at $1 per 2,500 patch installs.
</span>,
<NonEnterpriseCta />,
2000 + numOverageInstalls * 0.04,
];
}

return [
'Enterprise',
<span>
<a className="link underline" href="contact#sales">
Contact us
</a>{' '}
for a discounted quote.
</span>,
null,
];
return ['Enterprise', <div></div>, <EnterpriseCTA />, null];
})();

return (
Expand Down Expand Up @@ -154,10 +134,7 @@ export function PricingCalculator() {
Use the <span className="font-bold">{recommendedPlan}</span> plan
{cost !== null && (
<span className="ml-2 text-sm">
(
{numPatchesPerMonth * totalPatchInstalls > 50_000
? 'Up to '
: ''}
({totalPatchInstalls > 50_000 ? 'Up to ' : ''}
{formatMoney(cost)} per month)
</span>
)}
Expand All @@ -168,9 +145,32 @@ export function PricingCalculator() {
{formatNumber(totalPatchInstalls)}
</span>{' '}
patch installs per month. {helpText}
<div className="pt-2">{cta}</div>
</div>
</div>
</div>
</div>
);
}

function NonEnterpriseCta() {
return (
<div>
<a className="link underline" href="https://console.shorebird.dev">
Sign up
</a>{' '}
here.
</div>
);
}

function EnterpriseCTA() {
return (
<span>
<a className="link underline" href="contact#sales">
Contact us
</a>{' '}
for a discounted quote.
</span>
);
}

0 comments on commit a4fc931

Please sign in to comment.