@@ -4,6 +4,7 @@ import AmitRaikwarLogo from '@assets/images/AmitRaikwarLogo.png';
44import { SearchIcon } from '@assets' ;
55import { useRef } from 'react' ;
66import { useTranslation } from 'react-i18next' ;
7+ import { useNavigate } from 'react-router-dom' ;
78
89const NavigationLink = [
910 {
@@ -18,6 +19,10 @@ const NavigationLink = [
1819 name : 'navigation.about' ,
1920 href : 'about' ,
2021 } ,
22+ {
23+ name : 'navigation.contact' ,
24+ href : 'contact' ,
25+ } ,
2126] ;
2227
2328const ArticleLink = {
@@ -26,6 +31,7 @@ const ArticleLink = {
2631} ;
2732
2833const NavigationBar = ( ) => {
34+ const navigate = useNavigate ( ) ;
2935 const { t } = useTranslation ( ) ;
3036 const ref = useRef < HTMLDivElement > ( null ) ;
3137 const { setCursorInsets } = useCursor ( ) ;
@@ -56,52 +62,29 @@ const NavigationBar = () => {
5662 } ;
5763
5864 return (
59- < >
65+ < HStack
66+ position = { 'fixed' }
67+ marginY = { { md : 2 , xl : 4 } }
68+ width = { '100%' }
69+ paddingRight = { 14 }
70+ paddingLeft = { { base : 14 , '2xl' : 32 } }
71+ zIndex = { 1000 }
72+ justifyContent = { 'space-between' }
73+ >
74+ < Img
75+ src = { AmitRaikwarLogo }
76+ alt = { 'logo' }
77+ w = { 8 }
78+ h = { 6 }
79+ onClick = { ( ) => navigate ( '/' ) }
80+ _hover = { {
81+ transform : 'scale(1.3)' ,
82+ transition : 'transform 0.5s' ,
83+ cursor : 'pointer' ,
84+ } }
85+ />
6086 < HStack
61- position = { 'fixed' }
62- marginY = { { md : 4 , xl : 6 } }
63- w = { '100%' }
64- paddingRight = { 14 }
65- paddingLeft = { { base : 14 , '2xl' : 32 } }
6687 zIndex = { 1000 }
67- justifyContent = { 'space-between' }
68- >
69- < Img
70- src = { AmitRaikwarLogo }
71- alt = { 'logo' }
72- w = { 8 }
73- h = { 6 }
74- _hover = { {
75- transform : 'scale(1.3)' ,
76- transition : 'transform 0.5s' ,
77- cursor : 'pointer' ,
78- } }
79- />
80- < HStack >
81- < HStack
82- border = { '1px solid gray' }
83- padding = "2.5"
84- color = { 'white' }
85- borderRadius = "100px"
86- bg = { 'rgba(255, 255, 255, 0.1)' }
87- backdropFilter = { 'blur(20px)' }
88- transition = { 'all 0.3s' }
89- _hover = { {
90- transform : 'scale(1.1)' ,
91- cursor : 'pointer' ,
92- } }
93- onMouseEnter = { onMouseEnter }
94- onMouseLeave = { onMouseLeave }
95- ref = { ref }
96- onClick = { ( ) => { } } // eslint-disable-line
97- >
98- < SearchIcon />
99- </ HStack >
100- </ HStack >
101- </ HStack >
102- < HStack
103- zIndex = { 1000 }
104- position = { 'fixed' }
10588 columnGap = { 3 }
10689 top = { 6 }
10790 border = { '1px solid gray' }
@@ -121,13 +104,6 @@ const NavigationBar = () => {
121104 onClick = { ( ) => scrollToComponent ( href ) }
122105 />
123106 ) ) }
124- < LinkButton
125- key = { ArticleLink . name }
126- text = { t ( ArticleLink . name ) }
127- href = { ArticleLink . href }
128- fontSize = { 'lg' }
129- animationOnHover
130- />
131107 < Box
132108 padding = "0.2"
133109 borderRadius = "100px"
@@ -136,14 +112,34 @@ const NavigationBar = () => {
136112 transition = { 'background-color 0.3s' }
137113 >
138114 < LinkButton
139- key = { 'Contact' }
140- text = { t ( 'navigation.contact' ) }
141- href = { '#contact' }
115+ key = { ArticleLink . name }
116+ text = { t ( ArticleLink . name ) }
117+ href = { ArticleLink . href }
142118 fontSize = { 'lg' }
119+ animationOnHover
143120 />
144121 </ Box >
145122 </ HStack >
146- </ >
123+ < HStack
124+ border = { '1px solid gray' }
125+ padding = "2.5"
126+ color = { 'white' }
127+ borderRadius = "100px"
128+ bg = { 'rgba(255, 255, 255, 0.1)' }
129+ backdropFilter = { 'blur(20px)' }
130+ transition = { 'all 0.3s' }
131+ _hover = { {
132+ transform : 'scale(1.1)' ,
133+ cursor : 'pointer' ,
134+ } }
135+ onMouseEnter = { onMouseEnter }
136+ onMouseLeave = { onMouseLeave }
137+ ref = { ref }
138+ onClick = { ( ) => { } } // eslint-disable-line
139+ >
140+ < SearchIcon />
141+ </ HStack >
142+ </ HStack >
147143 ) ;
148144} ;
149145
0 commit comments