Login:App:Confirm: fix handling of getUserByEmail request results

This commit is contained in:
Darya Umrikhina 2024-07-24 17:47:32 +04:00
parent 283e7b221e
commit 780252f9f1

View File

@ -70,10 +70,9 @@ export default function withLoader<T extends WithLoaderProps>(
const getData = useCallback(async () => {
if (type === "EmpInvite" && email) {
try {
const response = await getUserByEmail(email, confirmHeader);
if (response) {
if (response !== 404) {
const loginData = window.btoa(
JSON.stringify({
type: "invitation",
@ -87,9 +86,6 @@ export default function withLoader<T extends WithLoaderProps>(
`?loginData=${loginData}`,
);
}
return;
} catch (e) {}
}
try {