diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2017-11-30 13:56:53 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2017-12-06 12:38:19 +0100 |
| commit | 692fe4a6c6a5fdef65e7315e51bd2c22cffec1e9 (patch) | |
| tree | ee3ecafd33c4a9128343aadc15140c93f46ad1dc /app | |
| parent | 42474fc280f890eb248bf4ebc1726dee73249b33 (diff) | |
| download | mullvadvpn-692fe4a6c6a5fdef65e7315e51bd2c22cffec1e9.tar.xz mullvadvpn-692fe4a6c6a5fdef65e7315e51bd2c22cffec1e9.zip | |
Enable flow for SupportPage
Diffstat (limited to 'app')
| -rw-r--r-- | app/containers/SupportPage.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/containers/SupportPage.js b/app/containers/SupportPage.js index ef7b683a9d..d482c94637 100644 --- a/app/containers/SupportPage.js +++ b/app/containers/SupportPage.js @@ -1,15 +1,19 @@ +// @flow + import log from 'electron-log'; import { shell, ipcRenderer } from 'electron'; import { connect } from 'react-redux'; +import { bindActionCreators } from 'redux'; import { push } from 'react-router-redux'; import Support from '../components/Support'; import { resolveBin } from '../lib/proc'; import { execFile } from 'child_process'; import uuid from 'uuid'; -const mapStateToProps = (state) => { - return state; -}; +import type { ReduxState, ReduxDispatch } from '../redux/store'; +import type { SharedRouteProps } from '../routes'; + +const mapStateToProps = (state: ReduxState) => state; const unAnsweredIpcCalls = new Map(); function reapIpcCall(id) { @@ -32,9 +36,11 @@ ipcRenderer.on('collect-logs-reply', (_event, id, err, reportId) => { } }); -const mapDispatchToProps = (dispatch, _props) => { +const mapDispatchToProps = (dispatch: ReduxDispatch, _props: SharedRouteProps) => { + const { push: pushHistory } = bindActionCreators({ push }, dispatch); + return { - onClose: () => dispatch(push('/settings')), + onClose: () => pushHistory('/settings'), onCollectLog: (toRedact) => { return new Promise((resolve, reject) => { |
