diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 48c496e5..dba5b3fa 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -12,9 +12,12 @@ import { MapIcon, MessageSquareIcon, SettingsIcon, + SidebarCloseIcon, + SidebarOpenIcon, UsersIcon, ZapIcon, } from "lucide-react"; +import { useState } from "react"; export interface SidebarProps { children?: React.ReactNode; @@ -25,6 +28,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => { const myNode = nodes.get(hardware.myNodeNum); const myMetadata = metadata.get(0); const { activePage, setActivePage, setDialogOpen } = useDevice(); + const [showSidebar, setShowSidebar] = useState(true); interface NavLink { name: string; @@ -60,7 +64,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => { }, ]; - return ( + return showSidebar ? (
@@ -76,6 +80,12 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => { > +
@@ -109,5 +119,14 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => { {children}
+ ) : ( +
+ +
); };