undefined сессия не затирает существующую, ФК не блочит кнопку

This commit is contained in:
Nastya 2024-02-12 02:35:00 +03:00
parent 9868a95bdb
commit ec1657496c
2 changed files with 3 additions and 3 deletions

@ -47,7 +47,7 @@ export async function getData(quizId: string): Promise<{
}
}
SESSIONS = headers["x-sessionkey"];
SESSIONS = headers["x-sessionkey"] ? headers["x-sessionkey"] : SESSIONS;
return { data, isRecentlyCompleted: false };
} catch (nativeError) {

@ -106,8 +106,6 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
return enqueueSnackbar("введена некорректная почта");
}
//почта валидна
setFire(true);
if (fireOnce.current) {
if (
@ -118,6 +116,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
&& adress.length === 0
) return enqueueSnackbar("Пожалуйста, заполните поля");
//почта валидна, хоть одно поле заполнено
setFire(true);
try {
await inputHC();
fireOnce.current = false;