mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
add flushLoanContract logic
This commit is contained in:
parent
8da71d0229
commit
b0d3213816
@ -7,7 +7,8 @@ import OwnershipFetcher from '../fetchers/ownership_fetcher';
|
||||
class LoanContractActions {
|
||||
constructor() {
|
||||
this.generateActions(
|
||||
'updateLoanContract'
|
||||
'updateLoanContract',
|
||||
'flushLoanContract'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ let LoanForm = React.createClass({
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
LoanContractActions.flushLoanContract();
|
||||
LoanContractStore.unlisten(this.onChange);
|
||||
},
|
||||
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user