docs: update desktop nav menu item title (#10125)

Update menu item title to reflect current state of the desktop sidebar
This commit is contained in:
ahrbil
2024-12-31 11:05:00 +02:00
committed by GitHub
parent 5ca4b0bb00
commit 0e2f608db8
@@ -22,7 +22,8 @@ import { MenuItem } from "types"
export const MainNavDesktopMenu = () => { export const MainNavDesktopMenu = () => {
const [isOpen, setIsOpen] = useState(false) const [isOpen, setIsOpen] = useState(false)
const { setDesktopSidebarOpen, isSidebarShown } = useSidebar() const { setDesktopSidebarOpen, isSidebarShown, desktopSidebarOpen } =
useSidebar()
const ref = useRef<HTMLDivElement>(null) const ref = useRef<HTMLDivElement>(null)
useClickOutside({ useClickOutside({
@@ -65,7 +66,7 @@ export const MainNavDesktopMenu = () => {
}, },
{ {
type: "action", type: "action",
title: "Hide Sidebar", title: desktopSidebarOpen ? "Hide Sidebar" : "Show Sidebar",
icon: <SidebarLeft />, icon: <SidebarLeft />,
shortcut: `${getOsShortcut()}\\`, shortcut: `${getOsShortcut()}\\`,
action: () => { action: () => {
@@ -87,7 +88,7 @@ export const MainNavDesktopMenu = () => {
) )
return items return items
}, [isSidebarShown]) }, [isSidebarShown, desktopSidebarOpen])
return ( return (
<div <div