Add TypeScript interface for testimonials and set default testimonials in the TestimonialsCarousel component.
This commit is contained in:
@@ -3,7 +3,14 @@ import { Carousel } from '@mantine/carousel';
|
|||||||
import { Avatar, Card, Group, Stack, Text, Title } from '@mantine/core';
|
import { Avatar, Card, Group, Stack, Text, Title } from '@mantine/core';
|
||||||
import styles from './Testimonial.module.css';
|
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.",
|
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',
|
clientName: 'Steven Adair',
|
||||||
@@ -12,7 +19,11 @@ const testimonials = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
function TestimonialsCarousel() {
|
interface TestimonialsCarouselProps {
|
||||||
|
testimonials?: TestimonialItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
function TestimonialsCarousel({ testimonials = defaultTestimonials }: TestimonialsCarouselProps) {
|
||||||
const autoplay = Autoplay();
|
const autoplay = Autoplay();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user