@@ -4,57 +4,57 @@ import Image from 'next/image';
44import { useRef , useState } from 'react' ;
55
66const Avatar = ( ) => {
7- const typingIntervalRef = useRef ( null ) ;
8- const [ typedText , setTypedText ] = useState ( '' ) ;
9- const fullText = "Hey, It's so nice to see you here, thanks for visiting !" ;
7+ const typingIntervalRef = useRef ( null ) ;
8+ const [ typedText , setTypedText ] = useState ( '' ) ;
9+ const fullText = "Hey, It's so nice to see you here, thanks for visiting !" ;
1010
11- const handleMouseEnter = ( ) => {
12- startTypingAnimation ( ) ;
13- } ;
11+ const handleMouseEnter = ( ) => {
12+ startTypingAnimation ( ) ;
13+ } ;
1414
15- const handleMouseLeave = ( ) => {
16- clearInterval ( typingIntervalRef . current ) ;
17- setTypedText ( '' ) ;
18- } ;
15+ const handleMouseLeave = ( ) => {
16+ clearInterval ( typingIntervalRef . current ) ;
17+ setTypedText ( '' ) ;
18+ } ;
1919
20- const startTypingAnimation = ( ) => {
21- let index = 0 ;
22- typingIntervalRef . current = setInterval ( ( ) => {
23- setTypedText ( fullText . substring ( 0 , index ) ) ;
24- index ++ ;
25- if ( index > fullText . length ) {
26- clearInterval ( typingIntervalRef . current ) ;
27- }
28- } , 50 ) ;
29- } ;
20+ const startTypingAnimation = ( ) => {
21+ let index = 0 ;
22+ typingIntervalRef . current = setInterval ( ( ) => {
23+ setTypedText ( fullText . substring ( 0 , index ) ) ;
24+ index ++ ;
25+ if ( index > fullText . length ) {
26+ clearInterval ( typingIntervalRef . current ) ;
27+ }
28+ } , 50 ) ;
29+ } ;
3030
31- return (
32- < div className = " relative flex h-44 w-44 items-center justify-center" >
33- < div
34- onMouseEnter = { handleMouseEnter }
35- onMouseLeave = { handleMouseLeave }
36- className = " group absolute transition-all ease-in"
37- >
38- < div className = " wrap-avater" >
39- < Image
40- src = " /images/icons/shafin-logo.png"
41- alt = " avatar"
42- draggable = " false"
43- className = " -mt-[55px] duration-500 group-hover:drop-shadow-[-1px_-1px_0px_#ec4899]"
44- width = { 600 }
45- height = { 826 }
46- priority
47- />
48- </ div >
49- < div className = " absolute bottom-0 -ml-[100px] mb-56 hidden w-32 flex-col items-center lg:group-hover:flex" >
50- < p className = " whitespace-no-wrap relative z-10 h-[50px] w-32 rounded-md bg-sh-dark p-2 text-xs leading-none text-sh-white shadow-lg" >
51- { typedText }
52- </ p >
53- < div className = 'before:absolute before:-bottom-3 before:right-3 before:h-0 before:w-0 before:border-b-[20px] before:border-l-[12px] before:border-r-[24px] before:border-t-[12px] before:border-b-transparent before:border-l-transparent before:border-r-sh-dark before:border-t-sh-dark before:content-[""]' > </ div >
54- </ div >
55- </ div >
56- </ div >
57- ) ;
31+ return (
32+ < div className = ' relative flex h-44 w-44 items-center justify-center mt-5' >
33+ < div
34+ onMouseEnter = { handleMouseEnter }
35+ onMouseLeave = { handleMouseLeave }
36+ className = ' group absolute transition-all ease-in'
37+ >
38+ < div className = ' wrap-avater' >
39+ < Image
40+ src = ' /images/icons/shafin-logo.png'
41+ alt = ' avatar'
42+ draggable = ' false'
43+ className = ' -mt-[55px] duration-500 group-hover:drop-shadow-[-1px_-1px_0px_#ec4899]'
44+ width = { 600 }
45+ height = { 826 }
46+ priority
47+ />
48+ </ div >
49+ < div className = ' absolute bottom-0 -ml-[100px] mb-56 hidden w-32 flex-col items-center lg:group-hover:flex' >
50+ < p className = ' whitespace-no-wrap relative z-10 h-[50px] w-32 rounded-md bg-sh-dark p-2 text-xs leading-none text-sh-white shadow-lg' >
51+ { typedText }
52+ </ p >
53+ < div className = 'before:absolute before:-bottom-3 before:right-3 before:h-0 before:w-0 before:border-b-[20px] before:border-l-[12px] before:border-r-[24px] before:border-t-[12px] before:border-b-transparent before:border-l-transparent before:border-r-sh-dark before:border-t-sh-dark before:content-[""]' > </ div >
54+ </ div >
55+ </ div >
56+ </ div >
57+ ) ;
5858} ;
5959
6060export default Avatar ;
@@ -87,6 +87,6 @@ console.log(`
8787 u66;...^.....n$$&66o
8888 -...-..-.` ) ;
8989console . log (
90- '%c 🎉 Congratulations! 🎉\nYou found absolutely nothing!' ,
91- 'font-size: 18px; color: #ff1493; font-family: monospace;'
90+ '%c 🎉 Congratulations! 🎉\nYou found absolutely nothing!' ,
91+ 'font-size: 18px; color: #ff1493; font-family: monospace;'
9292) ;
0 commit comments