Add TypeScript interface for testimonials and set default testimonials in the TestimonialsCarousel component.

This commit is contained in:
Craig
2025-04-10 15:22:35 +01:00
parent 0dc593c817
commit ed105c3857

View File

@@ -3,7 +3,14 @@ import { Carousel } from '@mantine/carousel';
import { Avatar, Card, Group, Stack, Text, Title } from '@mantine/core';
import styles from './Testimonial.module.css';
const testimonials = [
export interface TestimonialItem {
text: string;
clientName: string;
role: string;
business: string;
}
const defaultTestimonials: TestimonialItem[] = [
{
text: "What set Craig apart was his ability to understand our business challenges and deliver a solution that worked for us. He didn't just build a model, he delivered a system our team could actually use.",
clientName: 'Steven Adair',
@@ -12,7 +19,11 @@ const testimonials = [
},
];
function TestimonialsCarousel() {
interface TestimonialsCarouselProps {
testimonials?: TestimonialItem[];
}
function TestimonialsCarousel({ testimonials = defaultTestimonials }: TestimonialsCarouselProps) {
const autoplay = Autoplay();
return (