Skip to content

Commit

Permalink
fix(clerk-js): Remove personal email from organization action list
Browse files Browse the repository at this point in the history
  • Loading branch information
panteliselef committed Jul 20, 2023
1 parent 7f73a9c commit 6715616
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/short-camels-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Removes identifier from Personal Workspace in the OrganizationSwitcher list (UI)
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const OrganizationActionList = (props: OrganizationActionListProps) => {
const { organizationList } = useCoreOrganizationList();
const { organization: currentOrg } = useCoreOrganization();
const user = useCoreUser();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user;
const { hidePersonal } = useOrganizationSwitcherContext();

const otherOrgs = (organizationList || []).map(e => e.organization).filter(o => o.id !== currentOrg?.id);
Expand Down Expand Up @@ -60,7 +62,7 @@ export const OrganizationActionList = (props: OrganizationActionListProps) => {
onClick={onPersonalWorkspaceClick}
>
<PersonalWorkspacePreview
user={user}
user={userWithoutIdentifiers}
size='sm'
avatarSx={t => ({ margin: `0 calc(${t.space.$3}/2)` })}
title={localizationKeys('organizationSwitcher.personalWorkspace')}
Expand Down

0 comments on commit 6715616

Please sign in to comment.