diff --git a/src/components/Billing/UpgradeAccountModal.tsx b/src/components/Billing/UpgradeAccountModal.tsx index 374a744e2..6a52a4e04 100644 --- a/src/components/Billing/UpgradeAccountModal.tsx +++ b/src/components/Billing/UpgradeAccountModal.tsx @@ -6,6 +6,7 @@ import { Sparkles, Heart, } from 'lucide-react'; +import type { LucideIcon } from 'lucide-react'; import { useEffect, useState } from 'react'; import { getUser } from '../../lib/jwt'; import { useMutation, useQuery } from '@tanstack/react-query'; @@ -21,6 +22,42 @@ import { httpPost } from '../../lib/query-http'; import { useToast } from '../../hooks/use-toast'; import { UpdatePlanConfirmation } from './UpdatePlanConfirmation'; +// Define the perk type +type Perk = { + icon: LucideIcon; + title: string; + description: string; +}; + +// Define the perks array +const PREMIUM_PERKS: Perk[] = [ + { + icon: Zap, + title: 'Unlimited AI Course Generations', + description: 'Generate as many custom courses as you need', + }, + { + icon: Infinity, + title: 'No Daily Limits on course features', + description: 'Use all features without restrictions', + }, + { + icon: MessageSquare, + title: 'Unlimited Course Follow-ups', + description: 'Ask as many questions as you need', + }, + { + icon: Sparkles, + title: 'Early Access to Features', + description: 'Be the first to try new tools and features', + }, + { + icon: Heart, + title: 'Support Development', + description: 'Help us continue building roadmap.sh', + }, +]; + type CreateSubscriptionCheckoutSessionBody = { priceId: string; success?: string; @@ -140,16 +177,16 @@ export function UpgradeAccountModal(props: UpgradeAccountModalProps) { {loader} {!isLoading && !error && (
-
-

+
+

Unlock Premium Features

-

+

Supercharge your learning experience with premium benefits

-
+
{USER_SUBSCRIPTION_PLAN_PRICES.map((plan) => { const isCurrentPlanSelected = currentPlan?.priceId === plan.priceId; @@ -159,41 +196,41 @@ export function UpgradeAccountModal(props: UpgradeAccountModalProps) {
-

+

{isYearly ? 'Yearly Payment' : 'Monthly Payment'}

{isYearly && ( - + (2 months free) )}
{isYearly && ( - + Most Popular )}
{isYearly && ( -

+

$ {calculateYearlyPrice( USER_SUBSCRIPTION_PLAN_PRICES[0].amount, )}

)} -

+

${plan.amount}{' '} - + / {isYearly ? 'year' : 'month'}

@@ -204,8 +241,8 @@ export function UpgradeAccountModal(props: UpgradeAccountModalProps) {
)}