проверка ошибки промокода на пустую строку

This commit is contained in:
Tamara 2024-05-04 03:52:12 +03:00
parent 1db9e54458
commit 1668cbe36b
2 changed files with 2 additions and 2 deletions

@ -19,7 +19,7 @@ export async function activatePromocode(promocode: string) {
return response.greetings;
} catch (nativeError) {
const [error] = parseAxiosError(nativeError);
throw new Error(error);
}
}

@ -200,7 +200,7 @@ function TariffPage() {
setDiscounts(discounts);
}
})
.catch(enqueueSnackbar);
.catch((error) => {if (error.message !== "" && typeof(error.message)==="string") enqueueSnackbar(error.message)})
}
return (