import { ReactElement, ReactNode, useRef, useState } from 'react'; import { CarouselHandle, CarouselRoot, CarouselSlide, CarouselViewport, } from './carousel'; import { PayfitIcon, UkgIcon } from '@nx/nx-dev/ui-icons'; import { PlayIcon } from '@heroicons/react/24/outline'; import { sendCustomEvent } from '@nx/nx-dev/feature-analytics'; import { VideoModal } from '@nx/nx-dev/ui-common'; export function Carousel({ items, }: { items: { element: ReactNode; innerButtonElement: ReactNode }[]; }): ReactElement { const carouselRef = useRef(null); const iterableItems = items.map((item, index) => ({ ...item, id: crypto.randomUUID(), })); const [currentIndex, setCurrentIndex] = useState(0); const handleSlideChange = (index: number) => setCurrentIndex(index); return (
{/* Main carousel section */} {iterableItems.map((item, index) => ( {item.element} ))} {/* Custom line-style indicators */}
{iterableItems.map((_, index) => (
))}
{/* Partner logos section - now linked to carousel items */}
{iterableItems.map((item, index) => ( ))}
); } export function TestimonialCarousel(): ReactElement { const [isOpen, setIsOpen] = useState(false); const [currentVideo, setCurrentVideo] = useState(''); const openVideo = (videoUrl: string) => { setCurrentVideo(videoUrl); setIsOpen(true); }; return (
{ openVideo('https://youtu.be/Vdk-tza4PCs'); sendCustomEvent( 'payfit-testimonial-video-click', 'testimonial-carousel', 'enterprise' ); }} className="group relative cursor-pointer overflow-hidden" >
Watch the interview

"The number of hours we spent trying to manage CI before, trying to load balance in CircleCI, the number of agents that we run ourselves by hand and try to distribute ourselves manually - it was painful, we'd spend hours and days trying to do that.{' '} With Nx Cloud we don't need to think about that, here is my task, deal with it and make it fast ."

avatar
Nicolas Beaussart
Staff Platform Engineer, Payfit
), innerButtonElement: ( Increase speed ), }, { element: (
{ openVideo('https://youtu.be/rSC8wihnfP4'); sendCustomEvent( 'ukg-testimonial-video-click', 'testimonial-carousel', 'enterprise' ); }} className="group relative cursor-pointer overflow-hidden" >
Watch the interview

"I really like the Nx check-ins - Nx people are very well prepared for how to help their team grow and scale and to help us spot some of our challenges. I can't see a future where we don't have Nx."

Sid Govindaraju
Engineering Manager, UKG
), innerButtonElement: ( Proactive partnership ), }, ]} />
setIsOpen(false)} videoUrl={currentVideo} />
); }