Skip to content

Commit 0bb2879

Browse files
committed
Add changeset
1 parent ff693f5 commit 0bb2879

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/tasty-animals-grab.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/ui': patch
3+
---
4+
5+
Fix "You must belong to an organization" screen showing when user has existing memberships, invitations or suggestions

packages/ui/src/components/SessionTasks/tasks/TaskChooseOrganization/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const TaskChooseOrganizationInternal = () => {
2121
const hasExistingResources = !!(userMemberships?.count || userInvitations?.count || userSuggestions?.count);
2222
const isOrganizationCreationDisabled = !isLoading && !user?.createOrganizationEnabled && !hasExistingResources;
2323

24+
if (isOrganizationCreationDisabled) {
25+
return <OrganizationCreationDisabledScreen />;
26+
}
27+
2428
return (
2529
<Flow.Root flow='taskChooseOrganization'>
2630
<Flow.Part part='chooseOrganization'>
@@ -42,8 +46,6 @@ const TaskChooseOrganizationInternal = () => {
4246
elementDescriptor={descriptors.spinner}
4347
/>
4448
</Flex>
45-
) : isOrganizationCreationDisabled ? (
46-
<OrganizationCreationDisabledScreen />
4749
) : (
4850
<TaskChooseOrganizationFlows initialFlow={hasExistingResources ? 'choose' : 'create'} />
4951
)}

0 commit comments

Comments
 (0)