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

add flushLoanContract logic

This commit is contained in:
Tim Daubenschütz 2015-07-29 15:03:15 +02:00
parent 8da71d0229
commit b0d3213816
3 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,8 @@ import OwnershipFetcher from '../fetchers/ownership_fetcher';
class LoanContractActions {
constructor() {
this.generateActions(
'updateLoanContract'
'updateLoanContract',
'flushLoanContract'
);
}

View File

@ -36,6 +36,7 @@ let LoanForm = React.createClass({
},
componentWillUnmount() {
LoanContractActions.flushLoanContract();
LoanContractStore.unlisten(this.onChange);
},

View File

@ -17,6 +17,12 @@ class LoanContractStore {
this.contractUrl = contractUrl;
this.contractEmail = contractEmail;
}
onFlushLoanContract() {
this.contractKey = null;
this.contractUrl = null;
this.contractEmail = null;
}
}
export default alt.createStore(LoanContractStore, 'LoanContractStore');