Browse Source

fix(perf): Prevents settings route from marking "Performance" in sidebar as active (#77946)

There's a `/settings/projects/<project-slug>performance/` URL that
activates the "Performance" sidebar item because it's using an inexact
URL match. Omit Settings pages the same way other paths do this. Yucky
but works for now!
George Gritsouk 5 months ago
parent
commit
14db5e8934
1 changed files with 3 additions and 1 deletions
  1. 3 1
      static/app/components/sidebar/sidebarItem.tsx

+ 3 - 1
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/'))
   );
 }