diff options
author | Jason <jason.daurus@gmail.com> | 2016-06-18 14:11:42 +0800 |
---|---|---|
committer | Jason <jason.daurus@gmail.com> | 2016-06-18 14:11:47 +0800 |
commit | 6c0511b06fdc359ec4c48879f803c80d7fbeb34c (patch) | |
tree | 8945be2b82dcc2eadb80284cee0493a05c956af1 /web/src/js/components | |
parent | e4addd60f1ffbb445a8c05f3fb2b6c6e61bd7b93 (diff) | |
download | mitmproxy-6c0511b06fdc359ec4c48879f803c80d7fbeb34c.tar.gz mitmproxy-6c0511b06fdc359ec4c48879f803c80d7fbeb34c.tar.bz2 mitmproxy-6c0511b06fdc359ec4c48879f803c80d7fbeb34c.zip |
[web] add app ducks
Diffstat (limited to 'web/src/js/components')
-rw-r--r-- | web/src/js/components/ProxyApp.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/web/src/js/components/ProxyApp.jsx b/web/src/js/components/ProxyApp.jsx index b5d59b76..11c321e7 100644 --- a/web/src/js/components/ProxyApp.jsx +++ b/web/src/js/components/ProxyApp.jsx @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom' import _ from 'lodash' import { connect } from 'react-redux' -import { connect as wsConnect } from '../ducks/websocket' +import { init as appInit, destruct as appDestruct } from '../ducks/app' import Header from './Header' import EventLog from './EventLog' import Footer from './Footer' @@ -37,7 +37,7 @@ class ProxyAppMain extends Component { } componentWillMount() { - this.props.wsConnect() + this.props.appInit() } /** @@ -79,6 +79,7 @@ class ProxyAppMain extends Component { * @todo stop listening to window's key events */ componentWillUnmount() { + this.props.appDestruct() this.settingsStore.removeListener('recalculate', this.onSettingsChange) } @@ -168,6 +169,7 @@ export default connect( showEventLog: state.eventLog.visible }), { - wsConnect, + appInit, + appDestruct, } )(ProxyAppMain) |