Web: Client: ChangeUserTypeEvent: Added client error message

This commit is contained in:
Ilya Oleshko 2023-02-06 15:15:08 +03:00
parent 1b14e863b4
commit 33630ce818

View File

@ -20,7 +20,7 @@ const ChangeUserTypeEvent = ({
successCallback,
abortCallback,
} = peopleDialogData;
const { t } = useTranslation(["ChangeUserTypeDialog", "Common"]);
const { t } = useTranslation(["ChangeUserTypeDialog", "Common", "Payments"]);
useEffect(() => {
if (!peopleDialogData.toType) return;
@ -41,8 +41,9 @@ const ChangeUserTypeEvent = ({
successCallback && successCallback();
})
.catch((err) => {
toastr.error(t("Payments:QuotaPaidUserLimitError"));
abortCallback && abortCallback();
toastr.error(err);
});
};