mirror of
https://github.com/fspc/workstand.git
synced 2025-02-23 01:13:22 -05:00
Add catch.
This commit is contained in:
parent
f95dbb256d
commit
ab7e8497de
@ -1,13 +1,13 @@
|
|||||||
import Checkbox from 'material-ui/Checkbox';
|
import Checkbox from 'material-ui/Checkbox';
|
||||||
import fetch from 'isomorphic-fetch';
|
import Cookies from 'js-cookie';
|
||||||
import FlatButton from 'material-ui/FlatButton';
|
import FlatButton from 'material-ui/FlatButton';
|
||||||
import moment from 'moment-timezone';
|
|
||||||
import RaisedButton from 'material-ui/RaisedButton';
|
import RaisedButton from 'material-ui/RaisedButton';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import TextField from 'material-ui/TextField';
|
import TextField from 'material-ui/TextField';
|
||||||
|
import fetch from 'isomorphic-fetch';
|
||||||
|
import moment from 'moment-timezone';
|
||||||
import Source from '../Source';
|
import Source from '../Source';
|
||||||
import Size from '../Size';
|
import Size from '../Size';
|
||||||
import Cookies from 'js-cookie';
|
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
block: {
|
block: {
|
||||||
@ -65,7 +65,8 @@ class BikeForm extends React.Component {
|
|||||||
if (response.status >= 400) {
|
if (response.status >= 400) {
|
||||||
throw new Error('Bad response from server');
|
throw new Error('Bad response from server');
|
||||||
}
|
}
|
||||||
console.log(response.json());
|
}).catch((error) => {
|
||||||
|
console.error(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +227,9 @@ class BikeForm extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mdl-grid">
|
<div className="mdl-grid">
|
||||||
<div className="mdl-cell right"></div>
|
<div className="mdl-cell right">
|
||||||
<RaisedButton label="Save" onTouchTap={this.handleSave} />
|
<RaisedButton label="Save" onTouchTap={this.handleSave} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user