Consistency fixes (#167)

Minor consistency fixes from @proddy's comments
This commit is contained in:
rjwats
2020-07-07 00:13:38 +01:00
committed by GitHub
parent 1f07dcdab2
commit f2b53a6d53
14 changed files with 38 additions and 37 deletions

View File

@ -23,7 +23,7 @@ const FullScreenLoading = () => {
<div className={classes.fullScreenLoading}>
<CircularProgress className={classes.progress} size={100} />
<Typography variant="h4">
Loading &hellip;
Loading&hellip;
</Typography>
</div>
)

View File

@ -84,11 +84,11 @@ export function restController<D, P extends RestControllerProps<D>>(endpointUrl:
}
throw Error("Invalid status code: " + response.status);
}).then(json => {
this.props.enqueueSnackbar("Changes successfully applied.", { variant: 'success' });
this.props.enqueueSnackbar("Update successful.", { variant: 'success' });
this.setState({ data: json, loading: false });
}).catch(error => {
const errorMessage = error.message || "Unknown error";
this.props.enqueueSnackbar("Problem saving: " + errorMessage, { variant: 'error' });
this.props.enqueueSnackbar("Problem updating: " + errorMessage, { variant: 'error' });
this.setState({ data: undefined, loading: false, errorMessage });
});
}