fix: Fix notification usage
Some checks failed
release-tag / release-image (push) Failing after 59s

This commit is contained in:
Илья Куприец 2025-05-25 20:10:23 +03:00
parent 16640cb116
commit 3110683c7d
2 changed files with 18 additions and 12 deletions

View File

@ -234,10 +234,12 @@ export const CreateSightArticle = ({
}
if (onSave) {
onSave(response.data);
notification.open({
message: "Статья успешно создана",
type: "success",
});
if (notification && typeof notification.open === "function") {
notification.open({
message: "Статья успешно создана",
type: "success",
});
}
} else {
window.location.reload();
}

View File

@ -65,15 +65,19 @@ export const SnapshotList = observer(() => {
}
);
notification?.open({
message: "Cнапшот восстановлен",
type: "success",
});
if (notification && typeof notification.open === "function") {
notification.open({
message: "Cнапшот восстановлен",
type: "success",
});
}
} catch (error) {
notification?.open({
message: "Ошибка при восстановлении снимка",
type: "error",
});
if (notification && typeof notification.open === "function") {
notification.open({
message: "Ошибка при восстановлении снимка",
type: "error",
});
}
}
};