From ef5838caa436a1a56aae4ee78951167c43d0ee75 Mon Sep 17 00:00:00 2001 From: Diego Tellez Date: Sun, 2 Mar 2025 11:49:19 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20close=20sidebar=20on=20user=20se?= =?UTF-8?q?lection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: The SidebarItems component has an onClose prop that's being passed to the RouterLink onClick handler, but in the Sidebar component, we are not passing this prop to SidebarItems. Fix: Now when a user clicks on any navigation item in the sidebar or the logout button, the drawer will automatically close as the new page loads. The onClose function is passed to each RouterLink in the SidebarItems component, which will trigger when a user clicks on a menu option. --- frontend/src/components/Common/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Common/Sidebar.tsx b/frontend/src/components/Common/Sidebar.tsx index 1d630f9d89..8437634f47 100644 --- a/frontend/src/components/Common/Sidebar.tsx +++ b/frontend/src/components/Common/Sidebar.tsx @@ -49,7 +49,7 @@ const Sidebar = () => { - + setOpen(false)} /> {