import { FC, useRef } from "react"; import { observer } from "mobx-react"; // components import { ProjectSidebarList } from "@/components/project"; import { WorkspaceHelpSection, WorkspaceSidebarDropdown, WorkspaceSidebarMenu, WorkspaceSidebarQuickAction, } from "@/components/workspace"; // hooks import { useAppTheme } from "@/hooks/store"; import useOutsideClickDetector from "@/hooks/use-outside-click-detector"; export interface IAppSidebar { } const AppSidebar: FC = observer(() => { // store hooks const { toggleSidebar, sidebarCollapsed } = useAppTheme(); // refs const ref = useRef(null); useOutsideClickDetector(ref, () => { if (sidebarCollapsed === false) { if (window.innerWidth < 768) { toggleSidebar(); } } }); return (
); }); export default AppSidebar;