diff --git a/src/components/profile/TestimonialsSection.tsx b/src/components/profile/TestimonialsSection.tsx index 8cd5584..8e1a2e3 100644 --- a/src/components/profile/TestimonialsSection.tsx +++ b/src/components/profile/TestimonialsSection.tsx @@ -19,12 +19,16 @@ export function TestimonialsSection({ testimonials }: TestimonialsSectionProps) return null; } + const averageRating = testimonials.length > 0 + ? (testimonials.reduce((sum, t) => sum + t.rating, 0) / testimonials.length).toFixed(1) + : '0.0'; + return (

Testimonials

- Clients rate our real estate services 4.9 out of 5 on average, based on recent client reviews. + Clients rate our real estate services {averageRating} out of 5 on average, based on {testimonials.length} recent client review{testimonials.length !== 1 ? 's' : ''}.

{testimonials.map((testimonial) => (