Skip to content

fix: remove highlight from inactive org in management settings sidebar #14059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions site/src/pages/ManagementSettingsPage/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ import { useOrganizationSettings } from "./ManagementSettingsLayout";

export const Sidebar: FC = () => {
const { organizations } = useOrganizationSettings();
const { organization = getOrganizationNameByDefault(organizations) } =
useParams() as { organization: string };
const { organization } = useParams() as { organization?: string };
const { multiple_organizations: organizationsEnabled } =
useFeatureVisibility();

let organizationName = organization;
if (location.pathname === "/organizations") {
organizationName = getOrganizationNameByDefault(organizations);
}

// TODO: Do something nice to scroll to the active org.

return (
Expand All @@ -44,7 +48,7 @@ export const Sidebar: FC = () => {
<OrganizationSettingsNavigation
key={org.id}
organization={org}
active={org.name === organization}
active={org.name === organizationName}
/>
))}
</>
Expand Down
Loading