From bc1adb8c7d5ef9e048be6a0d09b85fe037c5061f Mon Sep 17 00:00:00 2001 From: Badal Khatri Date: Fri, 1 Dec 2023 16:30:12 +0530 Subject: [PATCH] fix: #1925 Workspace Login when no team available --- apps/web/pages/auth/passcode.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/web/pages/auth/passcode.tsx b/apps/web/pages/auth/passcode.tsx index 63ca9f608..e249930fa 100644 --- a/apps/web/pages/auth/passcode.tsx +++ b/apps/web/pages/auth/passcode.tsx @@ -210,9 +210,10 @@ function WorkSpaceScreen({ form, className }: { form: TAuthenticationPasscode } ); useEffect(() => { - if (form.workspaces.length === 1 && form.workspaces[0].current_teams.length === 1) { + if (form.workspaces.length === 1) { setSelectedWorkspace(0); - setSelectedTeam(form.workspaces[0].current_teams[0].team_id); + form.workspaces[0].current_teams.length === 1 && + setSelectedTeam(form.workspaces[0].current_teams[0].team_id); setTimeout(() => { document.getElementById('continue-to-workspace')?.click(); }, 100); @@ -331,7 +332,7 @@ function WorkSpaceScreen({ form, className }: { form: TAuthenticationPasscode }