mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
fix loan form
This commit is contained in:
parent
ae8bc674d2
commit
dfbc7b75fe
@ -33,10 +33,10 @@ let LoanForm = React.createClass({
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
LoanContractStore.listen(this.onChange);
|
LoanContractStore.listen(this.onChange);
|
||||||
|
LoanContractActions.flushLoanContract();
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
LoanContractActions.flushLoanContract();
|
|
||||||
LoanContractStore.unlisten(this.onChange);
|
LoanContractStore.unlisten(this.onChange);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -88,20 +88,6 @@ let LoanForm = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onRequestHide() {
|
|
||||||
// Since the modal can be opened without sending it to the server
|
|
||||||
// and therefore clearing the store,
|
|
||||||
// we'll need to make sure to flush the store once the
|
|
||||||
// modal unmounts
|
|
||||||
LoanContractActions.updateLoanContract({
|
|
||||||
contractUrl: null,
|
|
||||||
contractEmail: null,
|
|
||||||
contractKey: null
|
|
||||||
});
|
|
||||||
|
|
||||||
this.props.onRequestHide();
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -119,7 +105,7 @@ let LoanForm = React.createClass({
|
|||||||
<Button
|
<Button
|
||||||
className="btn btn-danger btn-delete btn-sm ascribe-margin-1px"
|
className="btn btn-danger btn-delete btn-sm ascribe-margin-1px"
|
||||||
style={{marginLeft: '0'}}
|
style={{marginLeft: '0'}}
|
||||||
onClick={this.onRequestHide}>{getLangText('CLOSE')}</Button>
|
onClick={this.props.onRequestHide}>{getLangText('CLOSE')}</Button>
|
||||||
</p>
|
</p>
|
||||||
</div>}
|
</div>}
|
||||||
spinner={
|
spinner={
|
||||||
|
Loading…
Reference in New Issue
Block a user