diff --git a/components/Header.jsx b/components/Header.jsx index 1308832..13b5af0 100644 --- a/components/Header.jsx +++ b/components/Header.jsx @@ -133,6 +133,9 @@ function Header({ docLinks }) { href={navLink.href} target={navLink.target} className={`inline-block align-middle ${pathname == navLink.href || (navLink.href != "/" && pathname.indexOf(navLink.href + "/") == 0) ? "bg-accent" : ""} text-inherit px-2 py-1 mx-1 rounded-sm hover:bg-accent/60 transition-colors`} + onClick={() => { + setMenuShown(false); + }} > {navLink.label} @@ -143,6 +146,9 @@ function Header({ docLinks }) { href={headerLinks.git.href} target={headerLinks.git.target} className="whitespace-nowrap inline-block align-middle text-inherit px-2 py-1 h-8 mx-1 rounded-sm hover:bg-accent/60 transition-colors" + onClick={() => { + setMenuShown(false); + }} > { + setMenuShown(false); + }} > {docLink.label}