1
- "use client" ;
2
-
3
1
import { AccordionComponent } from "@/components/homepage/accordion-component" ;
4
2
import Pricing from "@/components/homepage/pricing" ;
5
3
import PageWrapper from "@/components/wrapper/page-wrapper" ;
6
- import { motion } from "framer-motion " ;
4
+ import { polar } from "@/lib/polar " ;
7
5
import { Check , DollarSign } from "lucide-react" ;
8
6
9
- export default function PricingPage ( ) {
7
+ export default async function PricingPage ( ) {
10
8
const features = [
11
9
"Authentication & Authorization" ,
12
10
"Payment Processing" ,
@@ -18,6 +16,10 @@ export default function PricingPage() {
18
16
"API Integration" ,
19
17
] ;
20
18
19
+ const { result } = await polar . products . list ( {
20
+ organizationId : process . env . POLAR_ORGANIZATION_ID
21
+ } )
22
+
21
23
return (
22
24
< PageWrapper >
23
25
< div className = "container mx-auto px-4" >
@@ -29,49 +31,29 @@ export default function PricingPage() {
29
31
30
32
< div className = "space-y-6 text-center" >
31
33
{ /* Pill badge */ }
32
- < motion . div
33
- initial = { { opacity : 0 , y : - 20 } }
34
- animate = { { opacity : 1 , y : 0 } }
35
- transition = { { duration : 0.5 } }
36
- className = "mx-auto w-fit rounded-full border border-blue-200 dark:border-blue-900 bg-blue-50 dark:bg-blue-900/30 px-4 py-1 mb-6"
37
- >
34
+ < div className = "mx-auto w-fit rounded-full border border-blue-200 dark:border-blue-900 bg-blue-50 dark:bg-blue-900/30 px-4 py-1 mb-6" >
38
35
< div className = "flex items-center gap-2 text-sm font-medium text-blue-900 dark:text-blue-200" >
39
36
< DollarSign className = "h-4 w-4" />
40
37
< span > Simple, Transparent Pricing</ span >
41
38
</ div >
42
- </ motion . div >
39
+ </ div >
43
40
44
41
{ /* Main heading */ }
45
- < motion . h1
46
- initial = { { opacity : 0 , y : 20 } }
47
- animate = { { opacity : 1 , y : 0 } }
48
- transition = { { duration : 0.5 , delay : 0.1 } }
49
- className = "text-4xl md:text-6xl lg:text-7xl font-bold tracking-tight bg-clip-text text-transparent bg-gradient-to-r from-gray-900 via-blue-800 to-gray-900 dark:from-white dark:via-blue-300 dark:to-white animate-gradient-x pb-2"
50
- >
42
+ < h1 className = "text-4xl md:text-6xl lg:text-7xl font-bold tracking-tight bg-clip-text text-transparent bg-gradient-to-r from-gray-900 via-blue-800 to-gray-900 dark:from-white dark:via-blue-300 dark:to-white animate-gradient-x pb-2" >
51
43
Choose Your Perfect Plan
52
- </ motion . h1 >
44
+ </ h1 >
53
45
54
46
{ /* Subtitle */ }
55
- < motion . p
56
- initial = { { opacity : 0 , y : 20 } }
57
- animate = { { opacity : 1 , y : 0 } }
58
- transition = { { duration : 0.5 , delay : 0.2 } }
59
- className = "text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-2xl mx-auto"
60
- >
47
+ < p className = "text-lg md:text-xl text-gray-600 dark:text-gray-400 max-w-2xl mx-auto" >
61
48
Get started with our powerful Next.js starter kit and build your
62
49
next big idea faster than ever
63
- </ motion . p >
50
+ </ p >
64
51
</ div >
65
52
</ section >
66
53
67
54
< section className = "py-12" >
68
55
< div className = "grid grid-cols-1 md:grid-cols-2 gap-12 items-center mb-16" >
69
- < motion . div
70
- initial = { { opacity : 0 , x : - 20 } }
71
- animate = { { opacity : 1 , x : 0 } }
72
- transition = { { duration : 0.5 , delay : 0.3 } }
73
- className = "space-y-4"
74
- >
56
+ < div className = "space-y-4" >
75
57
< h2 className = "text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-gray-900 via-blue-800 to-gray-900 dark:from-white dark:via-blue-300 dark:to-white" >
76
58
Everything You Need
77
59
</ h2 >
@@ -80,13 +62,8 @@ export default function PricingPage() {
80
62
need to build modern web applications. No more wasting time on
81
63
repetitive setups.
82
64
</ p >
83
- </ motion . div >
84
- < motion . div
85
- initial = { { opacity : 0 , x : 20 } }
86
- animate = { { opacity : 1 , x : 0 } }
87
- transition = { { duration : 0.5 , delay : 0.4 } }
88
- className = "grid grid-cols-1 sm:grid-cols-2 gap-4"
89
- >
65
+ </ div >
66
+ < div className = "grid grid-cols-1 sm:grid-cols-2 gap-4" >
90
67
{ features . map ( ( feature , index ) => (
91
68
< div
92
69
key = { feature }
@@ -96,11 +73,11 @@ export default function PricingPage() {
96
73
< span > { feature } </ span >
97
74
</ div >
98
75
) ) }
99
- </ motion . div >
76
+ </ div >
100
77
</ div >
101
78
102
79
< div className = "py-8" >
103
- < Pricing />
80
+ < Pricing result = { result as any } />
104
81
</ div >
105
82
</ section >
106
83
0 commit comments