mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-02-22 09:44:18 +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();
|
postCallback();
|
||||||
setAlert(_("Settings saved successfully"), ALERT_TYPES.SUCCESS);
|
setAlert(_("Settings saved successfully"), ALERT_TYPES.SUCCESS);
|
||||||
} else if (postState.state === API_STATE.ERROR) {
|
} 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) {
|
if (forisModuleState.state === API_STATE.ERROR) {
|
||||||
return <ErrorMessage />;
|
return <ErrorMessage />;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user