Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
deichman
Commits
fd41c9e4
Commit
fd41c9e4
authored
Jun 23, 2021
by
Øyvind Julsrud
Committed by
Oyvind
Jun 23, 2021
Browse files
DEICH-5917
: deichman.no: Fix navbar not closing when clicking list element
parent
f5ba69bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
deichman.no/components/Nav/Nav.js
View file @
fd41c9e4
...
...
@@ -27,26 +27,26 @@ const Nav = props => {
const
{
isVisible
,
isLoggedIn
,
userData
}
=
props
;
const
{
borrowerName
=
""
}
=
userData
;
const
handleRouteChange
=
()
=>
{
// Ensure navigation closes when changing routes
const
{
isVisible
}
=
props
;
if
(
isVisible
)
{
onToggle
();
}
};
useEffect
(()
=>
{
Router
.
events
.
on
(
"
routeChangeStart
"
,
handleRouteChange
);
return
()
=>
{
Router
.
events
.
off
(
"
routeChangeStart
"
,
handleRouteChange
);
};
},
[]);
},
[
handleRouteChange
,
Router
.
events
]);
const
onToggle
=
()
=>
{
props
.
toggleNav
();
};
const
handleRouteChange
=
()
=>
{
// Ensure navigation closes when changing routes
const
{
isVisible
}
=
props
;
if
(
isVisible
)
{
onToggle
();
}
};
const
handleSignup
=
()
=>
{
Router
.
push
(
"
/registrer-deg
"
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment