fix: pages table of content drop down close on click and app sidebar expansion by default on big screens (#3629)

This commit is contained in:
Ramesh Kumar Chandra 2024-02-12 19:11:56 +05:30 committed by GitHub
parent 042ed04a03
commit 41a9dc3603
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 9 deletions

View file

@ -12,7 +12,7 @@ import { ProjectSidebarList } from "components/project";
import { useApplication } from "hooks/store";
import useOutsideClickDetector from "hooks/use-outside-click-detector";
export interface IAppSidebar {}
export interface IAppSidebar { }
export const AppSidebar: FC<IAppSidebar> = observer(() => {
// store hooks
@ -32,6 +32,9 @@ export const AppSidebar: FC<IAppSidebar> = observer(() => {
if (window.innerWidth <= 768) {
themStore.toggleSidebar(true);
}
if (window.innerWidth > 768) {
themStore.toggleSidebar(false);
}
};
handleResize();
window.addEventListener("resize", handleResize);