fix: redirect to selected org if already present

This commit is contained in:
Meet
2024-09-12 03:37:55 +05:30
parent f213c75ede
commit 36e3e4c1b5

View File

@@ -43,6 +43,11 @@ export const useNavigateToSelectOrganization = () => {
await navigateUserToOrg(router, config.defaultAuthOrgId);
}
let localOrgId = localStorage.getItem("orgData.id")
if(!cliCallbackPort && localOrgId != null){
await navigateUserToOrg(router, localOrgId);
}
queryClient.invalidateQueries(userKeys.getUser);
let redirectTo = "/login/select-organization";