misc fixes in Form

This commit is contained in:
James
2018-12-10 17:20:43 -05:00
parent 788f5176e1
commit 976646de0f

View File

@@ -70,7 +70,6 @@ class Form extends Component {
// Make the API call from the action
api.requests[this.props.method.toLowerCase()](this.props.action, data).then(
res => {
console.log(res);
// Provide form data to the redirected page
if (this.props.redirect) {
this.props.history.push(this.props.redirect, data);
@@ -84,11 +83,11 @@ class Form extends Component {
});
}
},
(error) => {
error => {
console.log(error);
this.setState({
status: {
message: 'Sorry, there was a problem with your request.',
message: error.message,
type: 'error'
},
processing: false