Skip to content

Commit 3d76afb

Browse files
committed
Close menu after navigating
1 parent 46557de commit 3d76afb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/Header/Hamburger.component.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,13 @@ const Hamburger = () => {
9797
id="mobile-li"
9898
className="w-full p-4 border-t border-gray-400 border-solid rounded"
9999
>
100-
<Link href={href}>
101-
<a className="inline-block px-4 py-2 no-underline hover:text-black hover:underline">
100+
<Link href={href} passHref>
101+
<a
102+
className="inline-block px-4 py-2 no-underline hover:text-black hover:underline"
103+
onClick={() => {
104+
setisExpanded((prevExpanded) => !prevExpanded);
105+
}}
106+
>
102107
{title}
103108
</a>
104109
</Link>

0 commit comments

Comments
 (0)