From 2c25d973d77c1a7a1cfe35dd681a056250b6098e Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 27 Feb 2026 12:56:36 +0000 Subject: [PATCH] Update src/components/sections/testimonial/TestimonialCardSix.tsx --- .../testimonial/TestimonialCardSix.tsx | 250 +++++++++--------- 1 file changed, 123 insertions(+), 127 deletions(-) diff --git a/src/components/sections/testimonial/TestimonialCardSix.tsx b/src/components/sections/testimonial/TestimonialCardSix.tsx index 9ca1fe1..f07e821 100644 --- a/src/components/sections/testimonial/TestimonialCardSix.tsx +++ b/src/components/sections/testimonial/TestimonialCardSix.tsx @@ -1,6 +1,6 @@ -"use client"; +'use client'; -import { useState } from "react"; +import { useState } from 'react'; interface Testimonial { id: number; @@ -10,156 +10,152 @@ interface Testimonial { shortText: string; fullText: string; avatar?: string; + rating?: number; } -interface TestimonialCardSixProps { - testimonials?: Testimonial[]; -} - -const defaultTestimonials: Testimonial[] = [ +const testimonials: Testimonial[] = [ { id: 1, - author: "Sarah Johnson", - role: "Product Manager", - company: "TechCorp", - shortText: "Amazing service!", - fullText: - "This service has completely transformed how we manage our projects. The intuitive interface and powerful features have saved us countless hours. The support team is incredibly responsive and helpful. I would highly recommend this to any team looking to improve their workflow.", - avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Sarah", + author: 'Sarah Johnson', + role: 'Product Manager', + company: 'Tech Innovations Inc', + shortText: 'Exceptional service and support.', + fullText: 'This product has completely transformed how our team works. The exceptional service and support from the team made the transition seamless. We saw a 40% improvement in productivity within the first month.', + avatar: '👩‍💼', + rating: 5, }, { id: 2, - author: "Michael Chen", - role: "CEO", - company: "StartupXYZ", - shortText: "Game changer!", - fullText: - "We've been using this platform for 6 months now and the results speak for themselves. Our team productivity has increased by 40%, and the ROI has been exceptional. The platform scales beautifully with our growing needs. Couldn't ask for a better solution.", - avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Michael", + author: 'Michael Chen', + role: 'CEO', + company: 'Digital Solutions Ltd', + shortText: 'Best investment we made this year.', + fullText: 'Best investment we made this year. The platform is intuitive, powerful, and the ROI has exceeded our expectations. The team is responsive and genuinely cares about customer success. Highly recommended for any growing business.', + avatar: '👨‍💼', + rating: 5, }, { id: 3, - author: "Emily Rodriguez", - role: "Design Lead", - company: "Creative Studios", - shortText: "Exceeded expectations!", - fullText: - "The design and user experience are top-notch. Every detail has been thoughtfully considered. The collaboration features make it easy for our distributed team to work together seamlessly. This is the kind of tool that makes you wonder how you ever worked without it.", - avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Emily", + author: 'Emily Rodriguez', + role: 'Operations Director', + company: 'Global Enterprises', + shortText: 'Streamlined our entire workflow.', + fullText: 'Streamlined our entire workflow and reduced operational costs significantly. The implementation was smooth, and the training provided was comprehensive. Our team is now more efficient than ever before.', + avatar: '👩‍💻', + rating: 5, }, { id: 4, - author: "David Park", - role: "Operations Director", - company: "Global Solutions", - shortText: "Best investment ever!", - fullText: - "We've tried many solutions before, but this one stands out. The implementation was smooth, the training was comprehensive, and the ongoing support is exceptional. Our team adopted it immediately and we're seeing measurable improvements in efficiency and accuracy.", - avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=David", + author: 'David Thompson', + role: 'Founder', + company: 'StartUp Ventures', + shortText: 'Game-changer for our startup.', + fullText: 'A true game-changer for our startup. The scalability and flexibility of the solution allowed us to grow without limitations. Customer support is outstanding and always available when we need them.', + avatar: '👨‍🚀', + rating: 5, + }, + { + id: 5, + author: 'Jessica Lee', + role: 'Marketing Lead', + company: 'Creative Agency Pro', + shortText: 'Transformed our client deliverables.', + fullText: 'Transformed our client deliverables and improved our team collaboration. The analytics and reporting features are incredibly detailed and actionable. We\'ve already recommended it to several clients.', + avatar: '👩‍🎨', + rating: 5, + }, + { + id: 6, + author: 'Robert Martinez', + role: 'Technical Director', + company: 'Enterprise Solutions', + shortText: 'Robust, reliable, and secure.', + fullText: 'Robust, reliable, and secure platform that meets all our enterprise requirements. The API documentation is excellent, and integration with our existing systems was straightforward. Outstanding technical support team.', + avatar: '👨‍💻', + rating: 5, }, ]; -export default function TestimonialCardSix({ - testimonials = defaultTestimonials, -}: TestimonialCardSixProps) { - const [flipped, setFlipped] = useState<{ [key: number]: boolean }>({}); +interface CardProps { + testimonial: Testimonial; +} - const toggleFlip = (id: number) => { - setFlipped((prev) => ({ - ...prev, - [id]: !prev[id], - })); - }; +function TestimonialCard({ testimonial }: CardProps) { + const [isFlipped, setIsFlipped] = useState(false); return ( -
-
+
setIsFlipped(true)} + onMouseLeave={() => setIsFlipped(false)} + > +
+ {/* Front Side */} +
+
+
+
{testimonial.avatar}
+
+

{testimonial.author}

+

{testimonial.role}

+

{testimonial.company}

+
+
+
+ {Array.from({ length: testimonial.rating || 5 }).map((_, i) => ( + + ★ + + ))} +
+

{testimonial.shortText}

+
+

Hover to read more

+
+ + {/* Back Side */} +
+

+ {testimonial.fullText} +

+

+ — {testimonial.author} +

+
+
+
+ ); +} + +export default function TestimonialCardSix() { + return ( +
+
-

- What Our Clients Say -

+

What Our Clients Say

- Hover over cards to see full testimonials + Hover over any card to read the full testimonial

-
+
{testimonials.map((testimonial) => ( -
toggleFlip(testimonial.id)} - > -
- {/* Front of card */} -
-
-
- {testimonial.avatar && ( - {testimonial.author} - )} -
-

- {testimonial.author} -

-

- {testimonial.role} -

-
-
-

- "{testimonial.shortText}" -

-
-
-

{testimonial.company}

-
- {[...Array(5)].map((_, i) => ( - - ★ - - ))} -
-
-
- - {/* Back of card */} -
-
-

- {testimonial.author} -

-

- "{testimonial.fullText}" -

-
-

- Click to flip back -

-
-
-
+ ))}