@@ -7,6 +7,7 @@ import { BoundlessButton } from '../buttons';
77import { gsap } from 'gsap' ;
88import TestimonialCard from './TestimonialCard' ;
99import Image from 'next/image' ;
10+ import Newsletter from '../overview/Newsletter' ;
1011
1112type TestimonialsWallProps = {
1213 testimonials : Testimonial [ ] ;
@@ -19,7 +20,7 @@ export default function TestimonialsSection({
1920 const columnRefs = useRef < HTMLDivElement [ ] > ( [ ] ) ;
2021 const animations = useRef < gsap . core . Tween [ ] > ( [ ] ) ;
2122 const [ numColumns , setNumColumns ] = useState < number > ( 4 ) ;
22-
23+ const [ open , setOpen ] = useState ( false ) ;
2324 useEffect ( ( ) => {
2425 animations . current . forEach ( anim => anim . kill ( ) ) ;
2526 animations . current = [ ] ;
@@ -48,10 +49,16 @@ export default function TestimonialsSection({
4849 } ) ;
4950 wrapper . appendChild ( cloneContainer ) ;
5051
51- gsap . set ( wrapper , { y : 0 , force3D : true , willChange : 'transform' } ) ;
52+ const isEvenColumn = index % 2 === 0 ;
53+ const initialY = isEvenColumn ? 0 : - totalHeight ;
54+ gsap . set ( wrapper , {
55+ y : initialY ,
56+ force3D : true ,
57+ willChange : 'transform' ,
58+ } ) ;
5259
5360 const anim = gsap . to ( wrapper , {
54- y : - totalHeight ,
61+ y : isEvenColumn ? - totalHeight : 0 ,
5562 duration : 60 ,
5663 ease : 'none' ,
5764 repeat : - 1 ,
@@ -205,7 +212,7 @@ export default function TestimonialsSection({
205212 </ div >
206213 </ div >
207214
208- < div className = 'absolute lg:bottom-[60px] bottom-14 lg:mt-0 mt-20 left-1/2 -translate-x-1/2 md:max-h-[212px] w-[90%] max-w-6xl bg-primary rounded-xl shadow-lg p-8 md:p-12 text-black z-40' >
215+ < div className = 'absolute lg:bottom-[60px] bottom-14 lg:mt-0 mt-20 left-1/2 -translate-x-1/2 md:max-h-[212px] w-full max-w-[90vw] bg-primary rounded-xl shadow-lg p-8 md:p-12 text-black z-40' >
209216 < div className = 'flex flex-col md:flex-row items-center md:justify-between gap-6' >
210217 < div >
211218 < h2 className = 'text-3xl lg:text-5xl font-medium tracking-[-1.92px] leading-[100%] md:text-left text-center mb-2' >
@@ -233,6 +240,7 @@ export default function TestimonialsSection({
233240 fullWidth
234241 className = 'bg-transparent border border-black'
235242 aria-label = 'Subscribe for updates'
243+ onClick = { ( ) => setOpen ( true ) }
236244 >
237245 Subscribe for Updates
238246 </ BoundlessButton >
@@ -242,6 +250,7 @@ export default function TestimonialsSection({
242250 </ div >
243251 </ div >
244252 </ div >
253+ < Newsletter open = { open } onOpenChange = { setOpen } />
245254 </ section >
246255 ) ;
247256}
0 commit comments