@@ -10,124 +10,172 @@ import person from '../assets/person.png';
10
10
import person2 from '../assets/person2.png' ;
11
11
import ur from '../assets/ur.png' ;
12
12
13
+ const testimonials = [
14
+ {
15
+ id : 1 ,
16
+ name : 'Bernard Dushimimana' ,
17
+ role : 'Sr.Manager' ,
18
+ organization : 'Andela' ,
19
+ image : person ,
20
+ content : `I'm extremely impressed with Pulse and their performance management platform.
21
+ Since using their services, it has been a game-changer for our organization.
22
+ The platform is intuitive, easy to navigate, and packed with powerful features.` ,
23
+ } ,
24
+ {
25
+ id : 2 ,
26
+ name : 'Susan' ,
27
+ role : 'Sr.Manager' ,
28
+ organization : 'Andela' ,
29
+ image : person2 ,
30
+ content : `I'm delighted to share my positive experience with Pulse and their exceptional
31
+ performance management platform. Implementing their services has led to remarkable
32
+ improvements in our performance tracking and management processes.` ,
33
+ } ,
34
+ {
35
+ id : 3 ,
36
+ name : 'Dr. Jack' ,
37
+ role : 'Director' ,
38
+ organization : 'University of Rwanda' ,
39
+ image : ur ,
40
+ content : `
41
+ We are thrilled with the services provided by Pulse. Their performance management platform
42
+ has exceeded our expectations in every way. The user-friendly interface and comprehensive
43
+ features have made tracking and monitoring our performance metrics a breeze.
44
+ ` ,
45
+ } ,
46
+ {
47
+ id : 4 ,
48
+ name : 'Dr. Jack' ,
49
+ role : 'Director' ,
50
+ organization : 'University of Rwanda' ,
51
+ image : ur ,
52
+ content : `
53
+ We are thrilled with the services provided by Pulse. Their performance management platform
54
+ has exceeded our expectations in every way. The user-friendly interface and comprehensive
55
+ features have made tracking and monitoring our performance metrics a breeze.
56
+ ` ,
57
+ } ,
58
+ {
59
+ id : 5 ,
60
+ name : 'Dr. Jack' ,
61
+ role : 'Director' ,
62
+ organization : 'University of Rwanda' ,
63
+ image : ur ,
64
+ content : `
65
+ We are thrilled with the services provided by Pulse. Their performance management platform
66
+ has exceeded our expectations in every way. The user-friendly interface and comprehensive
67
+ features have made tracking and monitoring our performance metrics a breeze.
68
+ ` ,
69
+ } ,
70
+ {
71
+ id : 6 ,
72
+ name : 'Dr. Jack' ,
73
+ role : 'Director' ,
74
+ organization : 'University of Rwanda' ,
75
+ image : ur ,
76
+ content : `
77
+ We are thrilled with the services provided by Pulse. Their performance management platform
78
+ has exceeded our expectations in every way. The user-friendly interface and comprehensive
79
+ features have made tracking and monitoring our performance metrics a breeze.
80
+ ` ,
81
+ } ,
82
+ ] ;
83
+
13
84
function Testimonial ( ) {
14
- const { t } = useTranslation ( ) ;
15
85
const [ currentIndex , setCurrentIndex ] = useState ( 0 ) ;
16
86
17
- const testimonials = [
18
- {
19
- id : 1 ,
20
- name : 'Bernard Dushimimana' ,
21
- role : t ( 'Sr.Manager' ) ,
22
- organization : t ( 'Andela' ) ,
23
- image : person ,
24
- content : t ( 'Content1' ) ,
25
- } ,
26
- {
27
- id : 2 ,
28
- name : 'Susan' ,
29
- role : t ( 'Sr.Manager' ) ,
30
- organization : t ( 'Andela' ) ,
31
- image : person2 ,
32
- content : t ( 'Content2' ) ,
33
- } ,
34
- {
35
- id : 3 ,
36
- name : 'Dr. Jack' ,
37
- role : t ( 'Director' ) ,
38
- organization : t ( 'University of Rwanda' ) ,
39
- image : ur ,
40
- content : t ( 'Content3' ) ,
41
- } ,
42
- ] ;
43
-
44
87
const prevTestimonial = ( ) => {
45
- setCurrentIndex (
46
- ( prevIndex ) =>
47
- ( prevIndex - 1 + testimonials . length ) % testimonials . length ,
88
+ setCurrentIndex ( ( prevIndex ) =>
89
+ prevIndex === 0 ? testimonials . length - 1 : prevIndex - 1
48
90
) ;
49
91
} ;
50
92
51
93
const nextTestimonial = ( ) => {
52
- setCurrentIndex ( ( prevIndex ) => ( prevIndex + 1 ) % testimonials . length ) ;
94
+ setCurrentIndex ( ( prevIndex ) =>
95
+ prevIndex === testimonials . length - 1 ? 0 : prevIndex + 1
96
+ ) ;
53
97
} ;
54
98
55
99
useEffect ( ( ) => {
56
100
const interval = setInterval ( ( ) => {
57
- setCurrentIndex ( ( prevIndex ) => ( prevIndex + 1 ) % testimonials . length ) ;
101
+ setCurrentIndex ( ( prevIndex ) =>
102
+ prevIndex === testimonials . length - 1 ? 0 : prevIndex + 1
103
+ ) ;
58
104
} , 10000 ) ;
59
105
60
106
return ( ) => clearInterval ( interval ) ;
61
107
} , [ ] ) ;
62
108
63
109
return (
64
110
< >
65
- < div className = "block md:hidden flex-col lg:mx-10 md:mx-20 my-20 gap-10 relative font-serif" >
66
- { testimonials . map ( ( testimonial , index ) => (
67
- < div
68
- key = { testimonial . id }
69
- className = { `bg-indigo-100 dark:bg-dark-bg dark:text-slate-300 lg:w-1/3 p-8 md:w-full rounded-b-3xl sm:mx-3 rounded-t-3xl ${
70
- currentIndex === index ? 'visible' : 'hidden'
71
- } `}
111
+ < div className = "block md:hidden relative font-serif my-20" >
112
+ < div className = "overflow-hidden" >
113
+ < div
114
+ className = "flex transition-transform duration-500 ease-in-out"
115
+ style = { { transform : `translateX(-${ currentIndex * 100 } %)` } }
72
116
>
73
- < div className = "flex flex-col sm:flex-row mb-6 items-center" >
74
- < img className = "sm:w-1/4" src = { testimonial . image } alt = "" />
75
-
76
- < ul >
77
- < li className = "text-xs ml-3 dark:text-slate-300 text-neutral-600" >
78
- { testimonial . name }
79
- </ li >
80
- < li className = "text-xs mt-2 dark:text-slate-300 ml-3" >
81
- { testimonial . role } , { testimonial . organization }
82
- </ li >
83
- </ ul >
84
- </ div >
85
- < p className = "text-base dark:text-slate-300 text-neutral-900" >
86
- { testimonial . content }
87
- </ p >
117
+ { testimonials . map ( ( testimonial ) => (
118
+ < div
119
+ key = { testimonial . id }
120
+ className = "flex-shrink-0 w-full bg-indigo-100 dark:bg-dark-bg dark:text-slate-300 p-8 rounded-3xl mx-3"
121
+ >
122
+ < div className = "flex flex-col sm:flex-row mb-6 items-center" >
123
+ < img className = "sm:w-1/4" src = { testimonial . image } alt = "" />
124
+ < ul >
125
+ < li className = "text-xs ml-3 dark:text-slate-300 text-neutral-600" >
126
+ { testimonial . name }
127
+ </ li >
128
+ < li className = "text-xs mt-2 dark:text-slate-300 ml-3" >
129
+ { testimonial . role } , { testimonial . organization }
130
+ </ li >
131
+ </ ul >
132
+ </ div >
133
+ < p className = "text-base dark:text-slate-300 text-neutral-900" >
134
+ { testimonial . content }
135
+ </ p >
136
+ </ div >
137
+ ) ) }
88
138
</ div >
89
- ) ) }
139
+ </ div >
90
140
91
- < span className = "absolute top-1/2 left-3 transform -translate-y-1/2 text-neutral-600 rounded-full bg-slate-50 p-1 drop-shadow-2xl opacity-50 " >
92
- < AiOutlineLeft
93
- size = { 20 }
94
- onClick = { prevTestimonial }
95
- className = "cursor-pointer"
96
- />
97
- </ span >
98
-
99
- < span className = "absolute top-1/2 right-3 transform -translate-y-1/2 text-neutral-600 rounded-full bg-slate-50 p-1 drop-shadow-2xl opacity-50 " >
100
- < AiOutlineRight
101
- size = { 20 }
102
- onClick = { nextTestimonial }
103
- className = "cursor-pointer"
104
- />
105
- </ span >
141
+ < button
142
+ className = "absolute top-1/2 left-3 transform -translate-y-1/2 text-neutral-600 rounded-full bg-slate-50 p-1 drop-shadow-2xl opacity-50 hover:opacity-75 transition-opacity z-10"
143
+ onClick = { prevTestimonial }
144
+ >
145
+ < AiOutlineLeft size = { 20 } />
146
+ </ button >
147
+
148
+ < button
149
+ className = "absolute top-1/2 right-3 transform -translate-y-1/2 text-neutral-600 rounded-full bg-slate-50 p-1 drop-shadow-2xl opacity-50 hover:opacity-75 transition-opacity z-10"
150
+ onClick = { nextTestimonial }
151
+ >
152
+ < AiOutlineRight size = { 20 } />
153
+ </ button >
106
154
</ div >
107
155
108
- < div className = "hidden md:flex md:flex-row flex-col lg:mx-0 md:mx-0 my-20 gap-10 md:flex-wrap lg:flex-nowrap font-serif" >
109
- { testimonials . map ( ( testimonial , index ) => (
156
+ { /* Desktop view remains the same */ }
157
+ < div className = "hidden md:flex overflow-x-auto md:flex-row flex-col lg:mx-0 md:mx-0 my-20 gap-10 font-serif" >
158
+ { testimonials . map ( ( testimonial ) => (
110
159
< div
111
160
key = { testimonial . id }
112
- className = "bg-indigo-100 dark:bg-dark-bg lg:w-1/3 p-8 md:w-full rounded-b-3xl sm:mx-3 rounded-t-3xl "
161
+ className = "bg-indigo-100 dark:bg-dark-bg lg:w-1/3 p-8 md:w-full rounded-b-3xl sm:mx-3 rounded-t-3xl flex-shrink-0 "
113
162
>
114
- < div className = "flex flex-col sm:flex-row mb-6 items-center" >
163
+ < div className = "flex flex-col sm:flex-row mb-6 items-center" >
115
164
< img
116
165
className = "md:w-1/5 sm:w-1/3"
117
166
src = { testimonial . image }
118
167
alt = ""
119
168
/>
120
-
121
169
< ul >
122
- < li className = "text-sm ml-3 dark:text-slate-300 text-neutral-600" >
170
+ < li className = "text-sm ml-3 dark:text-slate-300 text-neutral-600" >
123
171
{ testimonial . name }
124
172
</ li >
125
- < li className = "text-sm dark:text-slate-300 mt-2 ml-3" >
173
+ < li className = "text-sm dark:text-slate-300 mt-2 ml-3" >
126
174
{ testimonial . role } , { testimonial . organization }
127
175
</ li >
128
176
</ ul >
129
177
</ div >
130
- < p className = "text-base dark:text-slate-300 text-neutral-900" >
178
+ < p className = "text-base dark:text-slate-300 text-neutral-900" >
131
179
{ testimonial . content }
132
180
</ p >
133
181
</ div >
@@ -168,20 +216,20 @@ function About({ styles }: any) {
168
216
] ;
169
217
170
218
return (
171
- < div className = " bg-white mt-auto dark:bg-dark-frame-bg font-serif" >
172
- < div className = " justify-between w-full h-full pb-5" >
219
+ < div className = "bg-white mt-auto dark:bg-dark-frame-bg font-serif" >
220
+ < div className = "justify-between w-full h-full pb-5" >
173
221
< div >
174
- < h1 className = "text-center text-neutral-700 mb-5 font lg:text-4xl md:text-2xl pt-10 pb-4 dark:text-slate-100" >
222
+ < h1 className = "text-center text-neutral-700 mb-5 font lg:text-4xl md:text-2xl pt-10 pb-4 dark:text-slate-100" >
175
223
{ t ( 'hero2' ) }
176
224
</ h1 >
177
225
</ div >
178
226
179
227
{ aboutCards . map ( ( { title, body, img, orientation } ) => (
180
228
< div
181
229
key = { body }
182
- className = { `mt-10 card-image lg:mx-10 sm:mx-5 md:flex ${ orientation } ` }
230
+ className = { `mt-10 card-image lg:mx-10 sm:mx-5 md:flex ${ orientation } ` }
183
231
>
184
- < div className = "shadow-md sm:shadow-none mx-auto md:mx-0 bg-indigo-100 items-center md:items-start flex-col dark:bg-dark-bg md:w-[45%] md:py-10 md:px-4 max-w-[35em] sm:w-full sm:rounded-3xl md:mr-2" >
232
+ < div className = "shadow-md sm:shadow-none mx-auto md:mx-0 bg-indigo-100 items-center md:items-start flex-col dark:bg-dark-bg md:w-[45%] md:py-10 md:px-4 max-w-[35em] sm:w-full sm:rounded-3xl md:mr-2" >
185
233
< h2 className = "pt-3 header-style lg:px-5 lg:text-2xl sm:text-xl lg:text-start sm:text-center md:text-start dark:text-slate-200" >
186
234
{ title }
187
235
</ h2 >
@@ -207,12 +255,14 @@ function About({ styles }: any) {
207
255
< div className = "px-5 mt-20" >
208
256
< h1 className = "font text-center text-neutral-700 lg:text-4xl sm:text-2xl dark:text-slate-100" >
209
257
{ ' ' }
210
- { t ( ' Come shape the future together' ) }
258
+ Come shape the future together{ ' ' }
211
259
</ h1 >
212
260
</ div >
213
261
< Testimonial />
214
262
</ div >
215
263
</ div >
216
264
) ;
217
265
}
266
+
218
267
export { About } ;
268
+
0 commit comments