diff --git a/packages/client/src/components/organization/switcher/index.tsx b/packages/client/src/components/organization/switcher/index.tsx index ee1bab7b..2fcf4a1e 100644 --- a/packages/client/src/components/organization/switcher/index.tsx +++ b/packages/client/src/components/organization/switcher/index.tsx @@ -11,6 +11,7 @@ import styles from './index.module.scss'; const { Text, Paragraph } = Typography; export const UserOrganizationsSwitcher = () => { + const { organizationId } = useRouterQuery<{ organizationId: string }>(); const { data: userOrganizations, loading: userOrganizationsLoading, @@ -29,34 +30,36 @@ export const UserOrganizationsSwitcher = () => { {userOrganizations.length ? ( <> - {userOrganizations.map((org) => { - return ( - - - - - - {org.name} - - - - - ); - })} + {userOrganizations + .filter((org) => org.id !== organizationId) + .map((org) => { + return ( + + + + + + {org.name} + + + + + ); + })} ) : null}