diff options
| author | Hank <hank@mullvad.net> | 2022-10-13 19:11:50 +0200 |
|---|---|---|
| committer | Hank <hank@mullvad.net> | 2022-10-20 16:36:14 +0200 |
| commit | e785a00f0091f53da70dceffc871622ae36de7fd (patch) | |
| tree | 2f7cc7e4a750e2cbe94f5079d0f5b3b672e52cf4 /gui/src/renderer/containers | |
| parent | 8df7475bc989276c2841d0fa8c290700b6bb3d91 (diff) | |
| download | mullvadvpn-e785a00f0091f53da70dceffc871622ae36de7fd.tar.xz mullvadvpn-e785a00f0091f53da70dceffc871622ae36de7fd.zip | |
Convert ProblemReport to functional component
Diffstat (limited to 'gui/src/renderer/containers')
| -rw-r--r-- | gui/src/renderer/containers/ProblemReportPage.tsx | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/gui/src/renderer/containers/ProblemReportPage.tsx b/gui/src/renderer/containers/ProblemReportPage.tsx deleted file mode 100644 index 1c405134c8..0000000000 --- a/gui/src/renderer/containers/ProblemReportPage.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { connect } from 'react-redux'; -import { bindActionCreators } from 'redux'; - -import ProblemReport from '../components/ProblemReport'; -import withAppContext, { IAppContext } from '../context'; -import { IHistoryProps, withHistory } from '../lib/history'; -import { IReduxState, ReduxDispatch } from '../redux/store'; -import supportActions from '../redux/support/actions'; - -const mapStateToProps = (state: IReduxState) => ({ - defaultEmail: state.support.email, - defaultMessage: state.support.message, - accountHistory: state.account.accountHistory, - isOffline: state.connection.isBlocked, - outdatedVersion: state.version.suggestedUpgrade ? true : false, - suggestedIsBeta: state.version.suggestedIsBeta ?? false, -}); - -const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext & IHistoryProps) => { - const { saveReportForm, clearReportForm } = bindActionCreators(supportActions, dispatch); - - return { - onClose() { - props.history.pop(); - }, - viewLog(id: string) { - void props.app.viewLog(id); - }, - saveReportForm, - clearReportForm, - collectProblemReport: props.app.collectProblemReport, - sendProblemReport: props.app.sendProblemReport, - onExternalLink: (url: string) => props.app.openUrl(url), - }; -}; - -export default withAppContext( - withHistory(connect(mapStateToProps, mapDispatchToProps)(ProblemReport)), -); |
