Skip to content

Commit

Permalink
Merge pull request #3023 from Infisical/fix-org-sidebar-check
Browse files Browse the repository at this point in the history
Fix: Correct Display Org Sidebar Check
  • Loading branch information
DanielHougaard authored Jan 22, 2025
2 parents 86acf88 + f88d6a1 commit 6cdc71b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ export const OrganizationLayout = () => {

const { t } = useTranslation();

const shouldShowOrgSidebar = !(
[
linkOptions({ to: "/organization/secret-manager/overview" }).to,
linkOptions({ to: "/organization/cert-manager/overview" }).to,
linkOptions({ to: "/organization/ssh/overview" }).to,
linkOptions({ to: "/organization/kms/overview" }).to,
linkOptions({ to: "/organization/secret-scanning" }).to,
linkOptions({ to: "/organization/secret-sharing" }).to
] as string[]
).includes(location.pathname);
const shouldShowOrgSidebar =
location.pathname.startsWith("/organization") &&
!(
[
linkOptions({ to: "/organization/secret-manager/overview" }).to,
linkOptions({ to: "/organization/cert-manager/overview" }).to,
linkOptions({ to: "/organization/ssh/overview" }).to,
linkOptions({ to: "/organization/kms/overview" }).to,
linkOptions({ to: "/organization/secret-scanning" }).to,
linkOptions({ to: "/organization/secret-sharing" }).to
] as string[]
).includes(location.pathname);

return (
<>
Expand Down

0 comments on commit 6cdc71b

Please sign in to comment.