'use client';
import Image from 'next/image';
import type { TestimonialsContent } from '@/types/cms';
interface TestimonialCardProps {
title: string;
content: string;
author: string;
role: string;
rating: number;
}
function TestimonialCard({ title, content, author, role, rating }: TestimonialCardProps) {
return (
{/* Quote Icon */}
{/* Title */}
{title}
{/* Content */}
{content}
{/* Star Rating */}
{[...Array(rating)].map((_, i) => (
))}
{/* Author Info */}
);
}
const defaultTestimonials = [
{
id: '1',
rating: 5,
title: 'No Longer Blood in the Water',
content: 'Using other sites to find a realtor ended with my phone ringing constantly. My number was sold off to multiple lists and it was so overwhelming. RE-Quest gave me confidence that my information was protected and I decided who I was in contact with.',
author: 'Alice T.',
role: '',
},
{
id: '2',
rating: 5,
title: 'Finding Someone Who Worked with Me',
content: 'RE-Quest let me narrow down my search terms, so I knew before I called that they had experience with the loan program I needed. I loved the in-app chat feature to talk to my short list before committing to a phone call.',
author: 'Kevin R.',
role: '',
},
{
id: '3',
rating: 5,
title: '',
content: 'The search terms on RE-Quest allowed me to show off my expertise as an agent. Now when leads reach out to me, they already have an idea of what kind of agent I am. Instant connection!',
author: 'Riley S.',
role: '',
},
];
const defaultContent: TestimonialsContent = {
title: 'Consumer Protection is Our Foundation',
subtitle: 'Buying or selling your home is one of the largest decisions you will make in your life. Don\u2019t let yourself be chased by salesmen. Find the service provider that matches your unique needs.',
ratingInfo: 'Clients rate our real estate services 4.9 out of 5 on average, based on recent client reviews.',
stats: [
{ iconPath: '/assets/icons/cities-icon.svg', boldText: '3 states', normalText: 'and counting' },
{ iconPath: '/assets/icons/properties-icon.svg', boldText: 'Hundreds of', normalText: 'Professionals' },
],
testimonials: defaultTestimonials,
};
export function TestimonialsSection({ content }: { content?: TestimonialsContent }) {
const data = content ?? defaultContent;
return (
{/* Section Header */}
{data.title}
{data.subtitle}
{data.ratingInfo}
{/* Stats Section */}
{data.stats.map((stat, index) => (
{stat.boldText}
{stat.normalText}
))}
{/* Divider Line */}
{/* Testimonials Grid */}
{data.testimonials.map((testimonial, index) => (
))}
);
}