|
1 | 1 | import { Suspense } from 'react';
|
2 | 2 |
|
3 | 3 | import { PricingBody } from '@/app/pricing/PricingBody';
|
4 |
| -import CheckoutButton from '@/components/CheckoutButton'; |
5 |
| -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; |
| 4 | +import { Plan, PricingCard } from '@/components/PricingCard'; |
| 5 | + |
| 6 | +const FREE_SUMMARY_LIMIT = 50; |
| 7 | +const PRO_PLAN_MONTHLY_PRICE = 1; |
| 8 | + |
| 9 | +const pricingOptions: Plan[] = [ |
| 10 | + { |
| 11 | + id: 'free', |
| 12 | + title: 'Free Plan', |
| 13 | + description: |
| 14 | + 'Get the essentials for free, perfect for quick summaries without breaking the bank (or... actually, just free!).', |
| 15 | + features: [ |
| 16 | + `Store up to ${FREE_SUMMARY_LIMIT} brilliant summaries`, |
| 17 | + 'Standard-speed summary magic 🪄', |
| 18 | + 'Access to basic models', |
| 19 | + ], |
| 20 | + note: 'Great for casually curious users or folks who just love the word "free".', |
| 21 | + isPremium: false, |
| 22 | + }, |
| 23 | + { |
| 24 | + id: 'pro', |
| 25 | + title: 'Pro Plan', |
| 26 | + description: |
| 27 | + 'Step it up a notch! Get faster, better summaries with fancy premium models and priority support that actually answers you.', |
| 28 | + features: [ |
| 29 | + 'Limitless summary vault', |
| 30 | + 'Lightning-fast processing speed (say goodbye to waiting) ⚡️', |
| 31 | + 'Access to pro models for enhanced accuracy', |
| 32 | + ], |
| 33 | + note: 'Perfect for power-users and professionals who need summaries on the fly!', |
| 34 | + isPremium: true, |
| 35 | + price: `$${PRO_PLAN_MONTHLY_PRICE}/month (yep, just a buck!)`, |
| 36 | + }, |
| 37 | +]; |
6 | 38 |
|
7 | 39 | export default function Pricing() {
|
8 | 40 | return (
|
9 |
| - <div className='flex min-h-screen flex-col items-center justify-center bg-gray-100'> |
| 41 | + <div className='flex min-h-screen flex-col items-center py-8 sm:py-16'> |
10 | 42 | <Suspense fallback={null}>
|
11 | 43 | <PricingBody />
|
12 | 44 | </Suspense>
|
13 |
| - <Card className='mx-auto w-full max-w-lg rounded-lg bg-white p-6 shadow-lg'> |
14 |
| - <CardHeader> |
15 |
| - <CardTitle className='text-center text-2xl font-semibold'> |
16 |
| - Premium Plan |
17 |
| - </CardTitle> |
18 |
| - </CardHeader> |
19 |
| - <CardContent> |
20 |
| - <p className='mb-4 text-center text-gray-600'> |
21 |
| - Unlock exclusive features and support by subscribing to our premium |
22 |
| - plan. |
23 |
| - </p> |
24 |
| - <div className='flex justify-center'> |
25 |
| - <CheckoutButton priceId={process.env.NEXT_PUBLIC_TEST_ID} /> |
26 |
| - </div> |
27 |
| - </CardContent> |
28 |
| - </Card> |
| 45 | + |
| 46 | + <div className='mx-auto flex max-w-4xl flex-wrap justify-center gap-8'> |
| 47 | + {pricingOptions.map((plan) => ( |
| 48 | + <PricingCard key={plan.id} plan={plan} /> |
| 49 | + ))} |
| 50 | + </div> |
29 | 51 | </div>
|
30 | 52 | );
|
31 | 53 | }
|
0 commit comments