import React from 'react'; import { Spinner } from '../ui/Spinner'; import { LaunchPlan } from './plans'; const formatUSD = (amount: number) => new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: amount % 1 === 0 ? 0 : 2, }).format(amount); interface PlanCardProps { plan: LaunchPlan; /** True while a checkout session is being created for this specific card. */ isLocking: boolean; /** True while any card (including this one) is locking - disables the rest. */ disabled: boolean; onLock: (plan: LaunchPlan) => void; } export const LaunchDiscountPlanCard: React.FC = ({ plan, isLocking, disabled, onLock, }) => { const accentTone = plan.popular ? 'bg-white ring-gray-900/20' : 'bg-white ring-gray-200'; return (
{plan.popular && (
MOST POPULAR
)}

{plan.name}

{plan.blurb}

{formatUSD(plan.discountMonthly)} first month
{formatUSD(plan.monthly)} then {formatUSD(plan.monthly)}/mo
    {plan.features.slice(0, 6).map(feature => (
  • {feature}
  • ))}

7 days free, then 50% off your first month.

); };