Skip to content

Commit

Permalink
docs: update desktop nav menu item title
Browse files Browse the repository at this point in the history
Update menu item title to reflect current state of the desktop sidebar
  • Loading branch information
ahrbil authored Nov 15, 2024
1 parent 1d88ad3 commit 8ed015d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { MenuItem } from "types"

export const MainNavDesktopMenu = () => {
const [isOpen, setIsOpen] = useState(false)
const { setDesktopSidebarOpen, isSidebarShown } = useSidebar()
const { setDesktopSidebarOpen, isSidebarShown, desktopSidebarOpen } =
useSidebar()
const ref = useRef<HTMLDivElement>(null)

useClickOutside({
Expand Down Expand Up @@ -65,7 +66,7 @@ export const MainNavDesktopMenu = () => {
},
{
type: "action",
title: "Hide Sidebar",
title: desktopSidebarOpen ? "Hide Sidebar" : "Show Sidebar",
icon: <SidebarLeft />,
shortcut: `${getOsShortcut()}\\`,
action: () => {
Expand All @@ -87,7 +88,7 @@ export const MainNavDesktopMenu = () => {
)

return items
}, [isSidebarShown])
}, [isSidebarShown, desktopSidebarOpen])

return (
<div
Expand Down

0 comments on commit 8ed015d

Please sign in to comment.