1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Remove useless code

This commit is contained in:
vrde 2015-06-01 18:00:34 +02:00
parent 4ee4530029
commit 2301373cae

View File

@ -11,6 +11,7 @@ export const FormMixin = {
, status: null
}
},
submit(e) {
e.preventDefault();
this.setState({submitted: true});
@ -20,16 +21,7 @@ export const FormMixin = {
.catch(this.handleError);
},
handleResponse(response){
if (response.status >= 200 && response.status < 300){
this.props.onRequestHide();
}
else if (response.status >= 400 && response.status < 500) {
this.handleError(response);
}
else {
}
},
handleError(err){
if (err.json) {
for (var input in errors){
@ -42,6 +34,7 @@ export const FormMixin = {
this.setState({submitted: false, status: response.status});
}
},
render(){
let alert = null;
if (this.state.status >= 500){