import React, { useState, useEffect, useRef } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { Card, CardContent } from "./ui/card"; import { Button } from "./ui/button"; import { Star } from "lucide-react"; import { ImageWithFallback } from "./figma/ImageWithFallback"; // High-quality Clutch logo placeholder const clutchLogo = "https://images.unsplash.com/photo-1560472354-b33ff0c44a43?w=120&h=60&fit=crop&auto=format"; const testimonials = [ { id: 1, name: "Sarah Chen", position: "CTO", company: "FinTech Innovations", image: "https://images.unsplash.com/photo-1494790108755-2616b332c5cd?w=150&h=150&fit=crop&auto=format", rating: 5, text: "WDI transformed our legacy banking system into a modern, scalable platform. Their expertise in financial technology is unmatched.", projectType: "Banking Platform Modernization" }, { id: 2, name: "Michael Rodriguez", position: "Founder & CEO", company: "HealthTech Solutions", image: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&auto=format", rating: 5, text: "The mobile health app WDI developed has revolutionized patient care delivery. Exceptional attention to healthcare compliance and user experience.", projectType: "Healthcare Mobile App" }, { id: 3, name: "Emily Watson", position: "VP of Digital Strategy", company: "RetailMax Corp", image: "https://images.unsplash.com/photo-1580489944761-15a19d654956?w=150&h=150&fit=crop&auto=format", rating: 5, text: "Our e-commerce platform's performance improved by 300% after WDI's optimization. Their technical expertise is outstanding.", projectType: "E-commerce Platform Enhancement" }, { id: 4, name: "James Thompson", position: "Chief Innovation Officer", company: "EduTech Pioneers", image: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&auto=format", rating: 5, text: "WDI's AI-powered learning platform has transformed how our students engage with content. Incredible innovation and execution.", projectType: "AI-Powered EdTech Platform" }, { id: 5, name: "Lisa Park", position: "Operations Director", company: "LogiFlow Systems", image: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=150&h=150&fit=crop&auto=format", rating: 5, text: "The supply chain management system WDI built has streamlined our operations and reduced costs by 40%. Highly recommended.", projectType: "Supply Chain Management System" } ]; export const CarouselTestimonials = () => { const [currentIndex, setCurrentIndex] = useState(0); const [isAutoPlaying, setIsAutoPlaying] = useState(true); const intervalRef = useRef(null); // Auto-play functionality useEffect(() => { if (isAutoPlaying) { intervalRef.current = setInterval(() => { setCurrentIndex((prevIndex) => prevIndex === testimonials.length - 1 ? 0 : prevIndex + 1 ); }, 5000); } return () => { if (intervalRef.current) { clearInterval(intervalRef.current); } }; }, [isAutoPlaying]); const goToPrevious = () => { setIsAutoPlaying(false); setCurrentIndex(currentIndex === 0 ? testimonials.length - 1 : currentIndex - 1); }; const goToNext = () => { setIsAutoPlaying(false); setCurrentIndex(currentIndex === testimonials.length - 1 ? 0 : currentIndex + 1); }; const goToSlide = (index: number) => { setIsAutoPlaying(false); setCurrentIndex(index); }; // Resume auto-play after user interaction useEffect(() => { if (!isAutoPlaying) { const resumeTimer = setTimeout(() => { setIsAutoPlaying(true); }, 10000); // Resume after 10 seconds return () => clearTimeout(resumeTimer); } }, [isAutoPlaying]); return (

What Our Clients Say

Hear from industry leaders who have transformed their businesses with our innovative solutions.

{/* Main Testimonial Display */}
{/* Client Photo and Info */}
{/* Rating Stars */}
{[...Array(testimonials[currentIndex].rating)].map((_, i) => ( ))}

{testimonials[currentIndex].name}

{testimonials[currentIndex].position}

{testimonials[currentIndex].company}

{testimonials[currentIndex].projectType}
{/* Testimonial Content */}
{/* Quote Icon */}
"
{testimonials[currentIndex].text}
{/* Clutch Logo */}
Verified Review on
{/* Navigation Controls */}
{/* Previous Button */} {/* Dots Indicator */}
{testimonials.map((_, index) => (
{/* Next Button */}
{/* Auto-play Indicator */}
{/* Additional Social Proof */}
98%
Client Satisfaction
150+
Projects Delivered
5.0
Average Rating
24/7
Support Available
); };