Skip to content

Commit 56dfc64

Browse files
authored
fix: don't highlight inactive org in management settings sidebar (#14059)
1 parent cf1fcab commit 56dfc64

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

site/src/pages/ManagementSettingsPage/Sidebar.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ import { useOrganizationSettings } from "./ManagementSettingsLayout";
1515

1616
export const Sidebar: FC = () => {
1717
const { organizations } = useOrganizationSettings();
18-
const { organization = getOrganizationNameByDefault(organizations) } =
19-
useParams() as { organization: string };
18+
const { organization } = useParams() as { organization?: string };
2019
const { multiple_organizations: organizationsEnabled } =
2120
useFeatureVisibility();
2221

22+
let organizationName = organization;
23+
if (location.pathname === "/organizations") {
24+
organizationName = getOrganizationNameByDefault(organizations);
25+
}
26+
2327
// TODO: Do something nice to scroll to the active org.
2428

2529
return (
@@ -44,7 +48,7 @@ export const Sidebar: FC = () => {
4448
<OrganizationSettingsNavigation
4549
key={org.id}
4650
organization={org}
47-
active={org.name === organization}
51+
active={org.name === organizationName}
4852
/>
4953
))}
5054
</>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy