From f93746a687325ad1699eba22e8ff74e6af644b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Jim=C3=A9nez?= Date: Tue, 23 Jul 2024 09:48:40 -0500 Subject: [PATCH] fix: sidebar selection on db click --- src/features/Main/Sidebar/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/Main/Sidebar/index.jsx b/src/features/Main/Sidebar/index.jsx index 8ece2fc..431ab46 100644 --- a/src/features/Main/Sidebar/index.jsx +++ b/src/features/Main/Sidebar/index.jsx @@ -54,6 +54,7 @@ export const Sidebar = () => { }; const addQueryParam = useInstitutionIdQueryParam(); + const currentSelection = activeTab.replace(/\?institutionId=\d+/, ''); return ( @@ -64,7 +65,7 @@ export const Sidebar = () => { key={link} title={label} path={addQueryParam(link)} - active={activeTab === link} + active={currentSelection === link} onClick={handleTabClick} icon={icon} />