diff --git a/www/packages/docs-ui/src/components/MainNav/DesktopMenu/index.tsx b/www/packages/docs-ui/src/components/MainNav/DesktopMenu/index.tsx index 0de1d7f74886f..b6e5cfb18a2b9 100644 --- a/www/packages/docs-ui/src/components/MainNav/DesktopMenu/index.tsx +++ b/www/packages/docs-ui/src/components/MainNav/DesktopMenu/index.tsx @@ -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(null) useClickOutside({ @@ -65,7 +66,7 @@ export const MainNavDesktopMenu = () => { }, { type: "action", - title: "Hide Sidebar", + title: desktopSidebarOpen ? "Hide Sidebar" : "Show Sidebar", icon: , shortcut: `${getOsShortcut()}\\`, action: () => { @@ -87,7 +88,7 @@ export const MainNavDesktopMenu = () => { ) return items - }, [isSidebarShown]) + }, [isSidebarShown, desktopSidebarOpen]) return (