Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const PersonalAccountPreview = withCardStateProvider(() => {
return null;
}

const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user;
const { primaryEmailAddress, primaryPhoneNumber, primaryWeb3Wallet, username, ...userWithoutIdentifiers } = user;

const handlePersonalClicked = () => {
if (!isLoaded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const OrganizationSwitcherPopover = React.forwardRef<HTMLDivElement, Orga
return null;
}

const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user;
const { primaryEmailAddress, primaryPhoneNumber, primaryWeb3Wallet, username, ...userWithoutIdentifiers } = user;

if (!isLoaded) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const OrganizationSwitcherTrigger = withAvatarShimmer(
return null;
}

const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user;
const { primaryEmailAddress, primaryPhoneNumber, primaryWeb3Wallet, username, ...userWithoutIdentifiers } = user;

return (
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
return null;
}

const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user;
const { primaryEmailAddress, primaryPhoneNumber, primaryWeb3Wallet, username, ...userWithoutIdentifiers } = user;

const { isLoading, hasNextPage } = userMemberships;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@ describe('OrganizationSwitcher', () => {
expect(getByText('Personal account')).toBeInTheDocument();
});

it('does not show user identifiers in the personal workspace trigger', async () => {
const { wrapper, props } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.com'],
username: 'testuser',
});
});

props.setProps({ hidePersonal: false });
const { getByText, queryByText } = render(<OrganizationSwitcher />, { wrapper });
expect(getByText('Personal account')).toBeInTheDocument();
expect(queryByText('test@clerk.com')).not.toBeInTheDocument();
expect(queryByText('testuser')).not.toBeInTheDocument();
});

it('shows "No organization selected" when user has no active organization and hidePersonal is true', async () => {
const { wrapper, props } = await createFixtures(f => {
f.withOrganizations();
Expand Down
Loading