"use client"; import { useRef } from "react"; import { GrowingBuilding } from "./PropertyAnimations"; export default function Testimonials() { const scrollContainerRef = useRef(null); const testimonials = [ { quote: "Aurora Springs transformed our idea of a dream home into reality. The attention to detail is unmatched.", author: "Rajesh Kumar", location: "Owner at Aurora Heights", rating: 5, date: "2 months ago" }, { quote: "The transparency and professionalism shown by the team made the entire buying process seamless.", author: "Priya Sharma", location: "Owner at Serene Meadows", rating: 5, date: "3 months ago" }, { quote: "Living here feels like a permanent vacation. The amenities and the community are world-class.", author: "David Miller", location: "Resident at The Grandeur", rating: 5, date: "1 month ago" }, { quote: "Exceptional service from start to finish. The team went above and beyond to ensure we found our perfect home.", author: "Anita Desai", location: "Owner at Green Valley", rating: 5, date: "4 months ago" }, { quote: "The quality of construction and the beautiful surroundings make this the best investment we've ever made.", author: "Michael Chen", location: "Resident at Skyline Towers", rating: 5, date: "5 months ago" } ]; const scroll = (direction: "left" | "right") => { if (scrollContainerRef.current) { const scrollAmount = direction === "left" ? -400 : 400; scrollContainerRef.current.scrollBy({ left: scrollAmount, behavior: "smooth" }); } }; const renderStars = (rating: number) => { return (
{[...Array(5)].map((_, i) => ( ))}
); }; const getInitials = (name: string) => { return name.split(' ').map(n => n[0]).join('').toUpperCase(); }; return (
{/* Decorative Animations */}

Stories of Satisfaction

{renderStars(5)}
5.0 • Based on {testimonials.length} reviews
{/* Slider Container */}
{/* Navigation Buttons */} {/* Scrollable Reviews */}
{testimonials.map((item, index) => (
{/* Header with Avatar and Info */}
{getInitials(item.author)}

{item.author}

{item.date}

{/* Star Rating */}
{renderStars(item.rating)}
{/* Review Text */}

"{item.quote}"

{/* Location Badge */}

{item.location}

))}
); }