diff --git a/js/components/ascribe_modal/modal_share.js b/js/components/ascribe_modal/modal_share.js index 235e4ad5..710ad820 100644 --- a/js/components/ascribe_modal/modal_share.js +++ b/js/components/ascribe_modal/modal_share.js @@ -39,6 +39,9 @@ let ShareModal = React.createClass({ }); let ShareForm = React.createClass({ + getInitialState(){ + return {errors: []} + }, submit(e) { e.preventDefault(); let url = "http://localhost:8000/api/ownership/shares/mail/"; @@ -51,6 +54,14 @@ let ShareForm = React.createClass({ }, body: JSON.stringify(this.getFormData()) }) + .then((response) => response.json()) + .catch(function(error) { + this.setState({errors: error}); + console.log('request failed', error); + }.bind(this)); + + //.then(FetchApiUtils.status) + }, getFormData() { return { diff --git a/js/components/edition.js b/js/components/edition.js index 3c4827cf..938293e8 100644 --- a/js/components/edition.js +++ b/js/components/edition.js @@ -38,7 +38,6 @@ let EditionHeader = React.createClass({ }); let EditionDetails = React.createClass({ - render() { return (