From 31959ef7da8a41d56f04fac01a09517e22709813 Mon Sep 17 00:00:00 2001 From: George Gritsouk <989898+gggritso@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:30:18 -0400 Subject: [PATCH] Omit settings routes from `isItemActive` There's a `/settings/projects/performance/` URL that activates the "Performance" sidebar item because it's using an inexact URL match. Omit Settings pages. --- static/app/components/sidebar/sidebarItem.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/app/components/sidebar/sidebarItem.tsx b/static/app/components/sidebar/sidebarItem.tsx index 833d6d24d51469..ae670d5ae95eff 100644 --- a/static/app/components/sidebar/sidebarItem.tsx +++ b/static/app/components/sidebar/sidebarItem.tsx @@ -335,7 +335,9 @@ export function isItemActive( location.pathname.includes('/alerts/') && !location.pathname.startsWith('/settings/')) || (item?.label === 'Releases' && location.pathname.includes('/release-thresholds/')) || - (item?.label === 'Performance' && location.pathname.includes('/performance/')) + (item?.label === 'Performance' && + location.pathname.includes('/performance/') && + !location.pathname.startsWith('/settings/')) ); }