From 8c29d5adcccb5b9b1a8923362ae577f6a78d8ab9 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Mon, 7 Apr 2025 09:48:38 +0100 Subject: [PATCH] mobile right slider bar bug fixed --- src/components/layouts/DashboardLayout.jsx | 2 +- src/context/GeneralLayoutContext.jsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/layouts/DashboardLayout.jsx b/src/components/layouts/DashboardLayout.jsx index 41c31bc..e353115 100644 --- a/src/components/layouts/DashboardLayout.jsx +++ b/src/components/layouts/DashboardLayout.jsx @@ -48,7 +48,7 @@ export default function DashboardLayout() {
setShowAsideDrawer('')}> {/*
setShowAsideDrawer('')} >
*/} -
+
e.stopPropagation()} className={`${showAsideDrawer =='right-aside' ? 'right-0' : '-right-full'} fixed z-[999] top-0 botom-0 px-8 py-4 h-full w-4/5 sm:w-[350px] bg-[#192440] dark:bg-[#1E1E2D] text-white-body`}>
diff --git a/src/context/GeneralLayoutContext.jsx b/src/context/GeneralLayoutContext.jsx index 4ffd2ce..31d05b8 100644 --- a/src/context/GeneralLayoutContext.jsx +++ b/src/context/GeneralLayoutContext.jsx @@ -80,10 +80,12 @@ export default function GeneralLayoutContext({children}) { window.addEventListener('resize', ()=>{ setShrinkAside(false) setShowAsideDrawer('') + setActiveMenu('') }) return () => window.removeEventListener('resize', window.addEventListener('resize', ()=>{ setShrinkAside(false) setShowAsideDrawer('') + setActiveMenu('') })) },[])