@@ -6,10 +6,11 @@ import { motion } from "framer-motion";
66import { Check , CornerDownRight , Target , Terminal } from "lucide-react" ;
77import Image from "next/image" ;
88import Link from "next/link" ;
9- import React from "react" ;
9+ import React , { useEffect } from "react" ;
1010import PrimaryButton from "@/components/ui/custom-button" ;
1111import PaymentFlow from "@/components/payment/PaymentFlow" ;
1212import { ActiveTag } from "@/components/ui/ActiveTag" ;
13+ import { usePathname } from "next/navigation" ;
1314const opensoxFeatures = [
1415 {
1516 id : 1 ,
@@ -66,7 +67,7 @@ const whySub = [
6667 } ,
6768 {
6869 content :
69- "This offer is only available for the first 1000 (20 slots booked) users" ,
70+ "This offer is only available for the first 1000 (64 slots booked) users" ,
7071 } ,
7172 {
7273 content :
@@ -109,6 +110,28 @@ const premiumPlanCard = {
109110} ;
110111
111112const Pricing = ( ) => {
113+ const pathname = usePathname ( ) ;
114+ const callbackUrl = `${ pathname } #pro-price-card` ;
115+
116+ useEffect ( ( ) => {
117+ if ( window . location . hash === "#pro-price-card" ) {
118+ const element = document . getElementById ( "pro-price-card" ) ;
119+ if ( element ) {
120+ setTimeout ( ( ) => {
121+ element . scrollIntoView ( { behavior : "smooth" , block : "start" } ) ;
122+ } , 100 ) ;
123+ }
124+ }
125+ if ( window . location . hash === "#testimonials" ) {
126+ const element = document . getElementById ( "testimonials" ) ;
127+ if ( element ) {
128+ setTimeout ( ( ) => {
129+ element . scrollIntoView ( { behavior : "smooth" , block : "start" } ) ;
130+ } , 100 ) ;
131+ }
132+ }
133+ } , [ ] ) ;
134+
112135 return (
113136 < >
114137 < main className = "w-full overflow-hidden flex flex-col items-center justify-center relative" >
@@ -247,7 +270,7 @@ const Pricing = () => {
247270 </ div >
248271 < div className = "flex flex-col lg:flex-row items-stretch justify-center gap-6" >
249272 < PricingCard />
250- < SecondaryPricingCard />
273+ < SecondaryPricingCard callbackUrl = { callbackUrl } />
251274 </ div >
252275 </ div >
253276 </ div >
@@ -347,7 +370,7 @@ const PricingCard = () => {
347370 ) ;
348371} ;
349372
350- const SecondaryPricingCard = ( ) => {
373+ const SecondaryPricingCard = ( { callbackUrl } : { callbackUrl : string } ) => {
351374 const premiumPlanId = process . env . NEXT_PUBLIC_YEARLY_PREMIUM_PLAN_ID ;
352375 const planIdOk =
353376 typeof premiumPlanId === "string" && premiumPlanId . length > 0 ;
@@ -375,7 +398,10 @@ const SecondaryPricingCard = () => {
375398 </ div >
376399 </ div >
377400
378- < div className = "w-full border-dashed border-border-primary px-6 lg:px-10 py-4" >
401+ < div
402+ id = "pro-price-card"
403+ className = "w-full border-dashed border-border-primary px-6 lg:px-10 py-4"
404+ >
379405 < div className = "flex items-center gap-4 flex-wrap" >
380406 < h2 className = "text-6xl lg:text-[90px] lg:leading-[82px] tracking-tight font-semibold" >
381407 $49{ " " }
@@ -401,7 +427,16 @@ const SecondaryPricingCard = () => {
401427 buttonClassName = { `w-full max-w-[500px] mx-auto font-semibold ${
402428 planIdOk ? "" : "opacity-60 cursor-not-allowed"
403429 } `}
430+ callbackUrl = { callbackUrl }
404431 />
432+ < div className = "flex justify-center mt-3" >
433+ < Link
434+ href = "/pitch"
435+ className = "text-sm text-text-tertiary hover:text-brand-purple-light transition-colors lowercase"
436+ >
437+ still not sure? read my pitch to you.
438+ </ Link >
439+ </ div >
405440 </ div >
406441 < div className = "w-full border-dashed border-border-primary px-6 lg:px-10 py-4 flex flex-col gap-4 flex-1" >
407442 < h2 className = "text-lg lg:text-xl tracking-tight text-left font-bold" >
@@ -552,7 +587,7 @@ const TestimonialsSection = () => {
552587 } ;
553588
554589 return (
555- < div className = " text-white " >
590+ < div className = " text-white " id = "testimonials" >
556591 < Header title = "What our Pro customers say about us" />
557592 < div className = "border-b border-[#252525] w-full min-h-[80dvh] grid grid-cols-1 lg:grid-cols-7" >
558593 < div className = "lg:col-span-2 flex flex-col font-medium divide-y divide-[#252525]" >
0 commit comments