mirror of
				https://gitlab.nic.cz/turris/reforis/foris-js.git
				synced 2025-11-03 23:00:31 +01:00 
			
		
		
		
	Use generic error message in the ForisForm.
This commit is contained in:
		@@ -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 />;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user