From 9985f533a967cf830c7c22e8e046d554e7b1978e Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Fri, 17 Apr 2026 08:08:04 +0530 Subject: [PATCH] feat: implement horizontal scroll for testimonials and display all reviews in dashboard --- src/app/(agent)/agent/dashboard/page.tsx | 4 ++-- src/components/profile/TestimonialsSection.tsx | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/app/(agent)/agent/dashboard/page.tsx b/src/app/(agent)/agent/dashboard/page.tsx index 00c0684..6b666f6 100644 --- a/src/app/(agent)/agent/dashboard/page.tsx +++ b/src/app/(agent)/agent/dashboard/page.tsx @@ -137,9 +137,9 @@ export default function AgentDashboard() { setPendingRequestCount(requestCounts.pending); } - // Map testimonials for TestimonialsSection (latest 3) + // Map all testimonials for TestimonialsSection (horizontal scroll) setTestimonials( - testimonialsData.slice(0, 3).map((t) => ({ + testimonialsData.map((t) => ({ id: t.id, text: t.text, author: t.authorName, diff --git a/src/components/profile/TestimonialsSection.tsx b/src/components/profile/TestimonialsSection.tsx index bf12a4e..e3e5ee1 100644 --- a/src/components/profile/TestimonialsSection.tsx +++ b/src/components/profile/TestimonialsSection.tsx @@ -30,15 +30,19 @@ export function TestimonialsSection({ testimonials }: TestimonialsSectionProps)

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) => ( - + className="flex-none w-[85%] sm:w-[45%] lg:w-[calc((100%-3rem)/3)] snap-start" + > + +
))}