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) { if (onSave) {
onSave(response.data); onSave(response.data);
notification.open({ if (notification && typeof notification.open === "function") {
message: "Статья успешно создана", notification.open({
type: "success", message: "Статья успешно создана",
}); type: "success",
});
}
} else { } else {
window.location.reload(); window.location.reload();
} }

View File

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