From 6e0d90c9f0f3cdc047d2ecf8d169508736085139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ckebean=E2=80=9D?= <“chenqiua@gmail.com”> Date: Mon, 28 Oct 2024 13:53:23 +0200 Subject: [PATCH] Testimonials redesign --- src/pages/About.tsx | 220 +++++++++++++++++++++++++++----------------- 1 file changed, 135 insertions(+), 85 deletions(-) diff --git a/src/pages/About.tsx b/src/pages/About.tsx index 13082cfdf..62643dacb 100644 --- a/src/pages/About.tsx +++ b/src/pages/About.tsx @@ -10,51 +10,97 @@ import person from '../assets/person.png'; import person2 from '../assets/person2.png'; import ur from '../assets/ur.png'; +const testimonials = [ + { + id: 1, + name: 'Bernard Dushimimana', + role: 'Sr.Manager', + organization: 'Andela', + image: person, + content: `I'm extremely impressed with Pulse and their performance management platform. + Since using their services, it has been a game-changer for our organization. + The platform is intuitive, easy to navigate, and packed with powerful features.`, + }, + { + id: 2, + name: 'Susan', + role: 'Sr.Manager', + organization: 'Andela', + image: person2, + content: `I'm delighted to share my positive experience with Pulse and their exceptional + performance management platform. Implementing their services has led to remarkable + improvements in our performance tracking and management processes.`, + }, + { + id: 3, + name: 'Dr. Jack', + role: 'Director', + organization: 'University of Rwanda', + image: ur, + content: ` + We are thrilled with the services provided by Pulse. Their performance management platform + has exceeded our expectations in every way. The user-friendly interface and comprehensive + features have made tracking and monitoring our performance metrics a breeze. + `, + }, + { + id: 4, + name: 'Dr. Jack', + role: 'Director', + organization: 'University of Rwanda', + image: ur, + content: ` + We are thrilled with the services provided by Pulse. Their performance management platform + has exceeded our expectations in every way. The user-friendly interface and comprehensive + features have made tracking and monitoring our performance metrics a breeze. + `, + }, + { + id: 5, + name: 'Dr. Jack', + role: 'Director', + organization: 'University of Rwanda', + image: ur, + content: ` + We are thrilled with the services provided by Pulse. Their performance management platform + has exceeded our expectations in every way. The user-friendly interface and comprehensive + features have made tracking and monitoring our performance metrics a breeze. + `, + }, + { + id: 6, + name: 'Dr. Jack', + role: 'Director', + organization: 'University of Rwanda', + image: ur, + content: ` + We are thrilled with the services provided by Pulse. Their performance management platform + has exceeded our expectations in every way. The user-friendly interface and comprehensive + features have made tracking and monitoring our performance metrics a breeze. + `, + }, +]; + function Testimonial() { - const { t } = useTranslation(); const [currentIndex, setCurrentIndex] = useState(0); - const testimonials = [ - { - id: 1, - name: 'Bernard Dushimimana', - role: t('Sr.Manager'), - organization: t('Andela'), - image: person, - content: t('Content1'), - }, - { - id: 2, - name: 'Susan', - role: t('Sr.Manager'), - organization: t('Andela'), - image: person2, - content: t('Content2'), - }, - { - id: 3, - name: 'Dr. Jack', - role: t('Director'), - organization: t('University of Rwanda'), - image: ur, - content: t('Content3'), - }, - ]; - const prevTestimonial = () => { - setCurrentIndex( - (prevIndex) => - (prevIndex - 1 + testimonials.length) % testimonials.length, + setCurrentIndex((prevIndex) => + prevIndex === 0 ? testimonials.length - 1 : prevIndex - 1 ); }; const nextTestimonial = () => { - setCurrentIndex((prevIndex) => (prevIndex + 1) % testimonials.length); + setCurrentIndex((prevIndex) => + prevIndex === testimonials.length - 1 ? 0 : prevIndex + 1 + ); }; useEffect(() => { const interval = setInterval(() => { - setCurrentIndex((prevIndex) => (prevIndex + 1) % testimonials.length); + setCurrentIndex((prevIndex) => + prevIndex === testimonials.length - 1 ? 0 : prevIndex + 1 + ); }, 10000); return () => clearInterval(interval); @@ -62,72 +108,74 @@ function Testimonial() { return ( <> -
- {testimonial.content} -
+ {testimonials.map((testimonial) => ( ++ {testimonial.content} +
++
{testimonial.content}