File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -58,3 +58,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
58
58
- improved LightHouse scores by optmizing images, creating a robots.txt file and adding proper alt tags
59
59
- updated 'about us' first section (our background, peer reviews, version control)
60
60
- updated 'about us' section (our goals, our purpose)
61
+ - updated mobile nav to automatically close when page route change is completed
Original file line number Diff line number Diff line change @@ -39,6 +39,19 @@ export default function Nav() {
39
39
} ;
40
40
} , [ ] ) ;
41
41
42
+ useEffect ( ( ) => {
43
+ const handleRouteChange = ( ) => {
44
+ setActive ( false )
45
+ }
46
+
47
+ router . events . on ( 'routeChangeComplete' , handleRouteChange )
48
+
49
+ return ( ) => {
50
+ router . events . off ( 'routeChangeComplete' , handleRouteChange )
51
+ }
52
+ } , [ ] ) ;
53
+
54
+
42
55
return (
43
56
< header className = { styles . header } ref = { headerRef } >
44
57
< Container >
You can’t perform that action at this time.
0 commit comments