'use client'; import React from 'react'; import { Star, CheckCircle, ChevronRight } from 'lucide-react'; import Link from 'next/link'; import type { Testimonial } from '@/lib/types'; interface Props { testimonials: Testimonial[]; title?: string; subtitle?: string; } function StarRating({ rating }: { rating: number }) { return (
{[...Array(5)].map((_, i) => ( ))}
); } function TestimonialCard({ testimonial }: { testimonial: Testimonial }) { return (
{testimonial.verified && ( Verified )}

"{testimonial.title}"

{testimonial.content}

{testimonial.author.name} {(testimonial.author.role || testimonial.author.company) && ( {[testimonial.author.role, testimonial.author.company].filter(Boolean).join(', ')} )} {testimonial.author.location && ( {testimonial.author.location} )}
); } export const TestimonialsCarousel: React.FC = ({ testimonials, title = 'What Our Customers Say', subtitle = 'Real experiences from businesses using QR Master', }) => { // Duplicate for seamless loop: when first set exits left, second set is identical → no visible reset const doubled = [...testimonials, ...testimonials]; return (

{title}

{subtitle}

{/* Full-width overflow mask */}
{doubled.map((t, idx) => ( ))}
See all {testimonials.length} reviews
); };