diff --git a/apps/web/components/navigation.tsx b/apps/web/components/navigation.tsx index 5b072a814..b4e52cd70 100644 --- a/apps/web/components/navigation.tsx +++ b/apps/web/components/navigation.tsx @@ -39,8 +39,13 @@ const navigation = [ icon: WrenchIcon, }, ]; + const userNavigation = [ - { name: "Your Profile", href: "/settings/profile", icon: UserCircleIcon }, + { + name: "Your Profile", + href: "/settings/profile", + icon: UserCircleIcon, + }, { name: "Sign out", href: "", @@ -101,7 +106,7 @@ export default function TopNavigation() { return ( <> - {({ open }) => ( + {({ open, close }) => ( <>
@@ -217,6 +222,9 @@ export default function TopNavigation() { "block pl-3 pr-4 py-2 border-l-4 text-base font-medium" )} aria-current={item.current ? "page" : undefined} + onClick={() => { + close(); + }} > {item.name} @@ -241,7 +249,13 @@ export default function TopNavigation() { {userNavigation.map((item) => ( { + close(); + } + : item.click + } href={item.href} className="block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800" >