summaryrefslogtreecommitdiffhomepage
path: root/app/containers
diff options
context:
space:
mode:
Diffstat (limited to 'app/containers')
-rw-r--r--app/containers/AccountPage.js4
-rw-r--r--app/containers/ConnectPage.js5
-rw-r--r--app/containers/LoginPage.js8
-rw-r--r--app/containers/SettingsPage.js9
4 files changed, 10 insertions, 16 deletions
diff --git a/app/containers/AccountPage.js b/app/containers/AccountPage.js
index ae992bc12a..4ef7de5d83 100644
--- a/app/containers/AccountPage.js
+++ b/app/containers/AccountPage.js
@@ -6,7 +6,7 @@ import { push } from 'react-router-redux';
import Account from '../components/Account';
import accountActions from '../redux/account/actions';
import { links } from '../config';
-import Linking from '../lib/linking';
+import { open } from '../lib/platform';
import type { ReduxState, ReduxDispatch } from '../redux/store';
import type { SharedRouteProps } from '../routes';
@@ -22,7 +22,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) =>
onClose: () => {
pushHistory('/settings');
},
- onBuyMore: () => Linking(links['purchase'])
+ onBuyMore: () => open(links['purchase'])
};
};
diff --git a/app/containers/ConnectPage.js b/app/containers/ConnectPage.js
index 1694e84556..6db84a7680 100644
--- a/app/containers/ConnectPage.js
+++ b/app/containers/ConnectPage.js
@@ -6,7 +6,7 @@ import { push } from 'react-router-redux';
import { links } from '../config';
import Connect from '../components/Connect';
import connectActions from '../redux/connection/actions';
-import Linking from '../lib/linking';
+import { open } from '../lib/platform';
import type { ReduxState, ReduxDispatch } from '../redux/store';
import type { SharedRouteProps } from '../routes';
@@ -25,6 +25,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) =>
const { backend } = props;
return {
+<<<<<<< HEAD
onSettings: () => {
pushHistory('/settings');
},
@@ -40,7 +41,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) =>
onDisconnect: () => {
disconnect(backend);
},
- onExternalLink: (type) => Linking(links[type]),
+ onExternalLink: (type) => open(links[type]),
getServerInfo: (relayLocation) => backend.serverInfo(relayLocation),
};
};
diff --git a/app/containers/LoginPage.js b/app/containers/LoginPage.js
index 16703fdc0c..bf1a7fdc70 100644
--- a/app/containers/LoginPage.js
+++ b/app/containers/LoginPage.js
@@ -1,16 +1,12 @@
-<<<<<<< HEAD
// @flow
-import { shell } from 'electron';
-=======
->>>>>>> Reactxp starter pack
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { push } from 'react-router-redux';
import Login from '../components/Login';
import accountActions from '../redux/account/actions';
import { links } from '../config';
-import Linking from '../lib/linking';
+import { open } from '../lib/platform';
import type { ReduxState, ReduxDispatch } from '../redux/store';
import type { SharedRouteProps } from '../routes';
@@ -30,7 +26,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) =>
onFirstChangeAfterFailure: () => {
resetLoginError();
},
- onExternalLink: (type) => Linking(links[type]),
+ onExternalLink: (type) => open(links[type]),
onAccountTokenChange: (token) => {
updateAccountToken(token);
},
diff --git a/app/containers/SettingsPage.js b/app/containers/SettingsPage.js
index 8d41efd4d9..351c819b40 100644
--- a/app/containers/SettingsPage.js
+++ b/app/containers/SettingsPage.js
@@ -1,13 +1,10 @@
// @flow
import { connect } from 'react-redux';
-import { bindActionCreators } from 'redux';
import { push } from 'react-router-redux';
import Settings from '../components/Settings';
-import settingsActions from '../redux/settings/actions';
import { links } from '../config';
-import Linking from '../lib/linking';
-import Exit from '../lib/exit';
+import { open, exit } from '../lib/platform';
import type { ReduxState, ReduxDispatch } from '../redux/store';
import type { SharedRouteProps } from '../routes';
@@ -16,12 +13,12 @@ const mapStateToProps = (state: ReduxState) => state;
const mapDispatchToProps = (dispatch: ReduxDispatch, _props: SharedRouteProps) => {
const { push: pushHistory } = bindActionCreators({ push }, dispatch);
return {
- onQuit: () => Exit(),
+ onQuit: () => exit(),
onClose: () => pushHistory('/connect'),
onViewAccount: () => pushHistory('/settings/account'),
onViewSupport: () => pushHistory('/settings/support'),
onViewAdvancedSettings: () => pushHistory('/settings/advanced'),
- onExternalLink: (type) => Linking(links[type]),
+ onExternalLink: (type) => open(links[type]),
};
};