From 2707bed0d8e9b6c72ad2b93cb2557eb37ee7bf5f Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 21 May 2025 16:32:48 +0100 Subject: [PATCH] Refactor premium page --- src/components/Premium/PremiumPage.tsx | 156 +++++++++++++------------ 1 file changed, 83 insertions(+), 73 deletions(-) diff --git a/src/components/Premium/PremiumPage.tsx b/src/components/Premium/PremiumPage.tsx index 0f49049d4..b89ad521d 100644 --- a/src/components/Premium/PremiumPage.tsx +++ b/src/components/Premium/PremiumPage.tsx @@ -11,9 +11,10 @@ import { Users2, Wand2, Play, - GitPullRequest + GitPullRequest, } from 'lucide-react'; import type { LucideIcon } from 'lucide-react'; +import { cn } from '../../lib/classname'; interface FeatureCardProps { title: string; @@ -22,7 +23,12 @@ interface FeatureCardProps { duration?: string; } -function FeatureCard({ title, description, Icon, duration = "2:30" }: FeatureCardProps) { +function FeatureCard({ + title, + description, + Icon, + duration = '2:30', +}: FeatureCardProps) { return (
@@ -31,7 +37,7 @@ function FeatureCard({ title, description, Icon, duration = "2:30" }: FeatureCar
-
+
{duration}
@@ -72,6 +78,48 @@ function Testimonial({ ); } +interface StatsItemProps { + icon: LucideIcon; + text: string; +} + +function StatsItem(props: StatsItemProps) { + const Icon = props.icon; + return ( +
+ + {props.text} +
+ ); +} + +interface CredibilityItemProps { + icon: LucideIcon; + iconClassName: string; + value: string; + label: string; + subLabel: string; +} + +function CredibilityItem(props: CredibilityItemProps) { + const Icon = props.icon; + return ( +
+
+ +
+
{props.value}
+
+ {props.label} +
+
{props.subLabel}
+
+ ); +} + export function PremiumPage() { const handleUpgrade = () => { alert('Upgrade functionality coming soon!'); @@ -121,22 +169,10 @@ export function PremiumPage() { {/* Stats Section */}
-
- - +100K Learners -
-
- - +135K Roadmaps -
-
- - +90K Courses -
-
- - +1M AI Chats -
+ + + +
{/* Testimonials */} @@ -240,60 +276,34 @@ export function PremiumPage() {
-
-
- -
-
#6
-
- Most Starred Project -
-
- Among 200M+ Repositories -
-
- -
-
- -
-
2.1M+
-
- Active Developers -
-
- Learning & Growing Daily -
-
- -
-
- -
-
37K+
-
- Discord Members -
-
- Active Community Support -
-
- -
-
- -
-
1000+
-
- Contributors -
-
- Community Driven Project -
-
+ + + +