File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
packages/clerk-js/src/ui/components/OrganizationSwitcher Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @clerk/clerk-js ' : patch
3
+ ---
4
+
5
+ Hide invitation in ` OrganizationSwitcher ` when user is already an active member of the organization
Original file line number Diff line number Diff line change @@ -168,7 +168,10 @@ const InvitationPreview = withCardStateProvider(
168
168
} ;
169
169
170
170
if ( status === 'accepted' ) {
171
- if ( acceptedOrganization ?. id && activeOrganization ?. id === acceptedOrganization . id ) {
171
+ if (
172
+ invitation . publicOrganizationData . id === activeOrganization ?. id ||
173
+ ( acceptedOrganization ?. id && activeOrganization ?. id === acceptedOrganization . id )
174
+ ) {
172
175
// Hide the Accepted invitation that looks like a membership when the organization is already active
173
176
return null ;
174
177
}
You can’t perform that action at this time.
0 commit comments