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