mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
Close nav on profile button click
This commit is contained in:
@ -39,8 +39,13 @@ const navigation = [
|
|||||||
icon: WrenchIcon,
|
icon: WrenchIcon,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const userNavigation = [
|
const userNavigation = [
|
||||||
{ name: "Your Profile", href: "/settings/profile", icon: UserCircleIcon },
|
{
|
||||||
|
name: "Your Profile",
|
||||||
|
href: "/settings/profile",
|
||||||
|
icon: UserCircleIcon,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Sign out",
|
name: "Sign out",
|
||||||
href: "",
|
href: "",
|
||||||
@ -244,7 +249,13 @@ export default function TopNavigation() {
|
|||||||
{userNavigation.map((item) => (
|
{userNavigation.map((item) => (
|
||||||
<Link
|
<Link
|
||||||
key={item.name}
|
key={item.name}
|
||||||
onClick={item.click}
|
onClick={
|
||||||
|
item.href.includes("/settings/profile")
|
||||||
|
? () => {
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
: item.click
|
||||||
|
}
|
||||||
href={item.href}
|
href={item.href}
|
||||||
className="block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800"
|
className="block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user