From 19ae9b5486e26200f9693e3fd907391fecd53b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Mon, 18 Mar 2024 14:02:29 +0000 Subject: [PATCH] fix: project settings selected tab bug (#6590) https://linear.app/unleash/issue/2-2034/project-settings-url-bug This prevents a bug where the wrong tab would show as selected, only present in an edge case where the project has the name of a settings tab. --- .../project/Project/ProjectSettings/ProjectSettings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx index 6f92369301..61b800199c 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx @@ -96,7 +96,8 @@ export const ProjectSettings = () => { tabs={tabs} value={ tabs.find( - ({ id }) => id && location.pathname?.includes(`/${id}`), + ({ id }) => + id && location.pathname?.includes(`/settings/${id}`), )?.id || tabs[0].id } onChange={onChange}