Skip to content

Commit 7e199bd

Browse files
show error where user doesn't belong to workspace
1 parent 77e3423 commit 7e199bd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

client/packages/lowcoder/src/pages/userAuth/formLoginSteps.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ export default function FormLoginSteps() {
116116
OrgApi.fetchOrgsByEmail(account)
117117
.then((resp) => {
118118
if (validateResponse(resp)) {
119-
console.log(resp.data.data);
120119
setOrgList(resp.data.data);
121-
if (resp.data.data.length === 1) {
120+
if (!resp.data.data.lenght) {
121+
throw new Error('Error: no workspaces found');
122+
}
123+
else if (resp.data.data.length === 1) {
122124
setOrganizationId(resp.data.data[0].orgId);
123125
setCurrentStep(CurrentStepEnum.AUTH_PROVIDERS);
124126
return;
@@ -154,7 +156,6 @@ export default function FormLoginSteps() {
154156
}}
155157
/>
156158
<ConfirmButton loading={orgLoading} disabled={!account} onClick={fetchOrgsByEmail}>
157-
{/* {trans("userAuth.login")} */}
158159
Continue
159160
</ConfirmButton>
160161
</AccountLoginWrapper>

0 commit comments

Comments
 (0)