summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/containers
diff options
context:
space:
mode:
authorHank <hank@mullvad.net>2022-10-11 15:44:12 +0200
committerHank <hank@mullvad.net>2022-10-13 13:48:17 +0200
commit2a8bd8b9cfbc06b41596c2333f8a39ecc8c987cf (patch)
treec388c59f51b5542eb045e9a64689b0caa04116cf /gui/src/renderer/containers
parentf0821f443b5b91e7d197f3dc8980931cbb2d287b (diff)
downloadmullvadvpn-2a8bd8b9cfbc06b41596c2333f8a39ecc8c987cf.tar.xz
mullvadvpn-2a8bd8b9cfbc06b41596c2333f8a39ecc8c987cf.zip
Create functional component
Diffstat (limited to 'gui/src/renderer/containers')
-rw-r--r--gui/src/renderer/containers/AccountPage.tsx32
1 files changed, 0 insertions, 32 deletions
diff --git a/gui/src/renderer/containers/AccountPage.tsx b/gui/src/renderer/containers/AccountPage.tsx
deleted file mode 100644
index 359d33b5c0..0000000000
--- a/gui/src/renderer/containers/AccountPage.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { connect } from 'react-redux';
-import { bindActionCreators } from 'redux';
-
-import { links } from '../../config.json';
-import Account from '../components/Account';
-import withAppContext, { IAppContext } from '../context';
-import { IHistoryProps, withHistory } from '../lib/history';
-import accountActions from '../redux/account/actions';
-import { IReduxState, ReduxDispatch } from '../redux/store';
-
-const mapStateToProps = (state: IReduxState) => ({
- isOffline: state.connection.isBlocked,
-});
-const mapDispatchToProps = (dispatch: ReduxDispatch, props: IHistoryProps & IAppContext) => {
- const account = bindActionCreators(accountActions, dispatch);
-
- return {
- prepareLogout: () => account.prepareLogout(),
- cancelLogout: () => account.cancelLogout(),
- onLogout: () => {
- void props.app.logout();
- },
- onClose: () => {
- props.history.pop();
- },
- onBuyMore: () => props.app.openLinkWithAuth(links.purchase),
- updateAccountData: () => props.app.updateAccountData(),
- getDeviceState: () => props.app.getDeviceState(),
- };
-};
-
-export default withAppContext(withHistory(connect(mapStateToProps, mapDispatchToProps)(Account)));