Web: Login: Conditions have been added.

This commit is contained in:
Tatiana Lopaeva 2023-08-31 16:34:28 +03:00
parent c5b03c8aeb
commit d65abdf452

View File

@ -212,7 +212,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
errorMessage = error;
}
if (error?.response?.status === 403) {
if (recaptchaPublicKey && error?.response?.status === 403) {
if (isCaptcha) {
captchaRef.current.reset();
}
@ -220,7 +220,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
setIsCaptcha(true);
}
if (error?.response?.status === 401) {
if (recaptchaPublicKey && error?.response?.status === 401) {
isCaptcha && setIsCaptcha(false);
}