1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-13 17:25:34 +01:00

Use generic error message in the ForisForm.

This commit is contained in:
Bogdan Bodnar 2019-11-12 15:27:40 +01:00
parent b831d664a9
commit 7e6e6f8c87
No known key found for this signature in database
GPG Key ID: 49E4169AD3CA42B0

View File

@ -87,9 +87,9 @@ export function ForisForm({
postCallback();
setAlert(_("Settings saved successfully"), ALERT_TYPES.SUCCESS);
} else if (postState.state === API_STATE.ERROR) {
setAlert(_("Cannot save settings"));
setAlert(postState.data);
}
}, [postCallback, postState.state, setAlert]);
}, [postCallback, postState.state, postState.data, setAlert]);
if (forisModuleState.state === API_STATE.ERROR) {
return <ErrorMessage />;