From 11a19c30778e94a079ad3a2e338584d0953b06cd Mon Sep 17 00:00:00 2001 From: Shourya Sinha <144530842+Shouryasinha64@users.noreply.github.com> Date: Sat, 16 Aug 2025 20:13:43 +0530 Subject: [PATCH 1/2] Update billing cycle toggle.tsx Updated the billing cycle toggle with smoother animations, customized the teams tiers features based on the real product, and linked the button logic with user authentication so that free plan users cannot directly upgrade. --- src/app/pricing/page.tsx | 105 ++++++++++++++++++++++++++++++++++----- 1 file changed, 93 insertions(+), 12 deletions(-) diff --git a/src/app/pricing/page.tsx b/src/app/pricing/page.tsx index 29499f8..f422499 100644 --- a/src/app/pricing/page.tsx +++ b/src/app/pricing/page.tsx @@ -6,7 +6,8 @@ import { useState } from 'react' interface PricingTier { name: string - price: string + monthlyPrice: number + annualPrice: number tokens: string description: string features: string[] @@ -15,10 +16,11 @@ interface PricingTier { perMember?: boolean } -const individualMonthlyTiers: PricingTier[] = [ +const individualTiers: PricingTier[] = [ { name: 'Free', - price: '0', + monthlyPrice: 0, + annualPrice: 0, tokens: '240K tokens', description: 'Start with a free account to speed up your workflow on public projects', features: [ @@ -31,7 +33,8 @@ const individualMonthlyTiers: PricingTier[] = [ }, { name: 'Pro', - price: '20', + monthlyPrice: 20, + annualPrice: 200,, tokens: '10M tokens', description: 'Ideal for hobbyists and casual users for light, exploratory use', features: [ @@ -44,7 +47,8 @@ const individualMonthlyTiers: PricingTier[] = [ }, { name: 'Pro 50', - price: '50', + monthlyPrice: 50, + annualPrice: 500, tokens: '26M tokens', description: 'Designed for professionals who need to use Bolt a few times per week', features: [ @@ -57,7 +61,8 @@ const individualMonthlyTiers: PricingTier[] = [ }, { name: 'Pro 100', - price: '100', + monthlyPrice: 100, + annualPrice: 1000, tokens: '55M tokens', description: 'Perfect for heavy users looking to enhance daily workflows', features: [ @@ -70,10 +75,49 @@ const individualMonthlyTiers: PricingTier[] = [ } ] +const teamTiers: PricingTier[] = [ + { + name: 'Team Starter', + monthlyPrice: 150, + annualPrice: 1500, + tokens: '200M tokens', + description: 'For small teams looking to collaborate', + features: [ + 'Up to 10 members', + 'Shared environments', + 'Team analytics', + 'Standard support' + ], + bg: 'from-yellow-600 to-orange-500', + button: 'Upgrade Team', + perMember: true + }, + { + name: 'Team Pro', + monthlyPrice: 400, + annualPrice: 4000, + tokens: '1B tokens', + description: 'For larger teams with advanced needs', + features: [ + 'Unlimited members', + 'Advanced analytics', + 'SSO Integration', + 'Priority support' + ], + bg: 'from-red-600 to-pink-600', + button: 'Upgrade Team Pro', + perMember: true + } +] + export default function Pricing() { const router = useRouter() const [showTeams, setShowTeams] = useState(false) - const [billingCycle, setBillingCycle] = useState('annual') + const isAuthenticated = false + const currentPlan = 'Free' + + const tiers = showTeams ? teamTiers : individualTiers + return (
@@ -95,8 +139,42 @@ export default function Pricing() { Start with a free account to speed up your workflow on public projects or boost your entire team with instantly-opening production environments. -
- {individualMonthlyTiers.map((tier, index) => ( + {/* Billing Cycle Toggle */} +
+ Monthly + setBillingCycle(billingCycle === 'monthly' ? 'annual' : 'monthly')} + initial={false} + animate={{ backgroundColor: billingCycle === 'annual' ? '#4ade80' : '#374151' }} + > + + + Annual +
+ + {/* Toggle between Individual and Teams */} +
+ + +
+ +
+ {tiers.map((tier, index) => (
- ${tier.price}/month + ${billingCycle === 'monthly' ? tier.monthlyPrice : tier.annualPrice} + /{billingCycle}
{tier.tokens}
@@ -128,7 +207,9 @@ export default function Pricing() {
) -} \ No newline at end of file +} From 3d0368f311d5b474f41a6180fe6e9822665b2a3d Mon Sep 17 00:00:00 2001 From: Shourya Sinha <144530842+Shouryasinha64@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:01:05 +0530 Subject: [PATCH 2/2] Update page.tsx