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:
parent
b831d664a9
commit
7e6e6f8c87
|
@ -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 />;
|
||||
|
|
Loading…
Reference in New Issue
Block a user