export const login = (email: string, password: string, rememberMe: boolean, captcha: string): ThunkType => async (
dispatch
) => {
let loginData = await AuthAPI.login(email, password, rememberMe, captcha)
if (loginData.resultCode === ResultCodesEnum.Success) {
dispatch(getAuthUserData())
} else {
if (loginData.resultCode === ResultCodeCaptchaEnum.CaptchaIsRequired) {
dispatch(getCaptchaUrl())
}
let message = loginData.messages.length > 0 ? loginData.messages[0] : 'Some error'
// setStatus(message)
}
}