1+ import { useCountUp } from 'react-countup' ;
2+
13const 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+
29 return (
310 < div className = "mt-10 sm:mt-20 bg-primary-light dark:bg-ternary-dark shadow-sm" >
411 < div className = "font-general-medium container mx-auto py-20 block sm:flex sm:justify-between items-center" >
512 < div className = "mb-20 sm:mb-0" >
613 < h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
7- 12
14+ < span id = "experienceCounter" />
815 </ h2 >
916 < span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
1017 Years of experience
@@ -13,7 +20,8 @@ const AboutCounter = () => {
1320
1421 < div className = "mb-20 sm:mb-0" >
1522 < h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
16- 20k+
23+ < span id = "githubStarsCounter" />
24+ k+
1725 </ h2 >
1826 < span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
1927 Stars on GitHub
@@ -22,7 +30,7 @@ const AboutCounter = () => {
2230
2331 < div className = "mb-20 sm:mb-0" >
2432 < h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
25- 92 %
33+ < span id = "feedbackCounter" /> %
2634 </ h2 >
2735 < span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
2836 Positive feedback
@@ -31,7 +39,7 @@ const AboutCounter = () => {
3139
3240 < div className = "mb-20 sm:mb-0" >
3341 < h2 className = "text-4xl text-center text-secondary-dark dark:text-secondary-light mb-2" >
34- 77
42+ < span id = "projectsCounter" /> %
3543 </ h2 >
3644 < span className = "font-general-regular block text-md text-center text-ternary-dark dark:text-ternary-light" >
3745 Projects completed
0 commit comments