Skip to content

Commit 01388fd

Browse files
authored
fix: only disable buttons if there is an eligible workspace (#8441)
* fix: only disable create button if there is an eligible workspace * change check
1 parent 0c94247 commit 01388fd

File tree

1 file changed

+5
-2
lines changed
  • packages/app/src/app/components/WorkspaceSetup/steps

1 file changed

+5
-2
lines changed

packages/app/src/app/components/WorkspaceSetup/steps/Create.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,11 @@ const JoinWorkspace: React.FC<{
214214
effects.gql.queries
215215
.getEligibleWorkspaces({})
216216
.then(result => {
217-
onDidFindWorkspace();
218-
setEligibleWorkspace(result.me.eligibleWorkspaces[0]);
217+
const hasEligibleWorkspace = result.me.eligibleWorkspaces.length > 0;
218+
if (hasEligibleWorkspace) {
219+
onDidFindWorkspace();
220+
setEligibleWorkspace(result.me.eligibleWorkspaces[0]);
221+
}
219222
})
220223
.catch(e => {})
221224
.finally(() => {

0 commit comments

Comments
 (0)