From 2fed1a7034cd55cc2bf7aba80dac4c441e2b8187 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Wed, 22 Mar 2023 09:45:15 +0000 Subject: [PATCH] Close nav on profile button click --- apps/web/components/navigation.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/web/components/navigation.tsx b/apps/web/components/navigation.tsx index 885a6881a..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: "", @@ -244,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" >