From d2b0e8831c20023c9caf7a9349410b3dfd0e4441 Mon Sep 17 00:00:00 2001 From: Walidoux Date: Mon, 21 Mar 2022 21:42:11 +0100 Subject: [PATCH] fix(components): change sidebar behaviour --- components/Application/Application.tsx | 10 ++++++++++ components/Application/Sidebar/Sidebar.tsx | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/components/Application/Application.tsx b/components/Application/Application.tsx index 7a353df..d870188 100644 --- a/components/Application/Application.tsx +++ b/components/Application/Application.tsx @@ -99,6 +99,15 @@ export const Application: React.FC = (props) => { } } + const handleCloseSidebars = (): void => { + if (isMobile && (visibleSidebars.left || visibleSidebars.right)) { + return setVisibleSidebars({ + left: false, + right: false + }) + } + } + const swipeableHandlers = useSwipeable({ trackMouse: false, trackTouch: true, @@ -202,6 +211,7 @@ export const Application: React.FC = (props) => {
= (props) => { return (