Skip to content

Commit f7ee478

Browse files
authored
fix(nav): Show correct nav on account settings (#89137)
1 parent 7530ca5 commit f7ee478

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

static/app/views/nav/useActiveNavGroup.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ describe('useActiveNavGroup', function () {
5858
[PrimaryNavGroup.DASHBOARDS, '/organizations/org-slug/dashboard/foo/'],
5959
[PrimaryNavGroup.INSIGHTS, '/organizations/org-slug/insights/foo/'],
6060
[PrimaryNavGroup.SETTINGS, '/organizations/org-slug/settings/foo/'],
61+
[PrimaryNavGroup.SETTINGS, '/settings/account/details/'],
6162
[PrimaryNavGroup.CODECOV, '/organizations/org-slug/codecov/foo/'],
6263
])('correctly matches %s nav group', async function (navGroup, path) {
6364
mockUsingCustomerDomain.mockReturnValue(false);

static/app/views/nav/useActiveNavGroup.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ const getPrimaryRoutePath = (path: string): string | undefined => {
1111
return path.match(CUSTOMER_DOMAIN_PRIMARY_PATH_REGEX)?.[1];
1212
}
1313

14-
return path.match(NON_CUSTOMER_DOMAIN_PRIMARY_PATH_REGEX)?.[1];
14+
return (
15+
path.match(NON_CUSTOMER_DOMAIN_PRIMARY_PATH_REGEX)?.[1] ??
16+
path.match(CUSTOMER_DOMAIN_PRIMARY_PATH_REGEX)?.[1]
17+
);
1518
};
1619

1720
export function useActiveNavGroup(): PrimaryNavGroup {

0 commit comments

Comments
 (0)