1
+ import { useCountUp } from 'react-countup' ;
2
+
1
3
const AboutCounter = ( ) => {
4
+ useCountUp ( { ref : 'experienceCounter' , end : 12 , duration : 2 } ) ;
5
+ useCountUp ( { ref : 'githubStarsCounter' , end : 20 , duration : 2 } ) ;
6
+ useCountUp ( { ref : 'feedbackCounter' , end : 92 , duration : 2 } ) ;
7
+ useCountUp ( { ref : 'projectsCounter' , end : 77 , duration : 2 } ) ;
8
+
2
9
return (
3
10
< div className = "mt-10 sm:mt-20 bg-primary-light dark:bg-ternary-dark shadow-sm" >
4
11
< div className = "font-general-medium container mx-auto py-20 block sm:flex sm:justify-between items-center" >
5
12
< div className = "mb-20 sm:mb-0" >
6
13
< h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
7
- 12
14
+ < span id = "experienceCounter" />
8
15
</ h2 >
9
16
< span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
10
17
Years of experience
@@ -13,7 +20,8 @@ const AboutCounter = () => {
13
20
14
21
< div className = "mb-20 sm:mb-0" >
15
22
< h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
16
- 20k+
23
+ < span id = "githubStarsCounter" />
24
+ k+
17
25
</ h2 >
18
26
< span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
19
27
Stars on GitHub
@@ -22,7 +30,7 @@ const AboutCounter = () => {
22
30
23
31
< div className = "mb-20 sm:mb-0" >
24
32
< h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
25
- 92 %
33
+ < span id = "feedbackCounter" /> %
26
34
</ h2 >
27
35
< span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
28
36
Positive feedback
@@ -31,7 +39,7 @@ const AboutCounter = () => {
31
39
32
40
< div className = "mb-20 sm:mb-0" >
33
41
< h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
34
- 77
42
+ < span id = "projectsCounter" /> %
35
43
</ h2 >
36
44
< span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
37
45
Projects completed
0 commit comments