diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-08-01 12:57:16 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-08-07 16:31:27 +0200 |
| commit | 12d85dfdc71fddb2a6228afd2e0917666415eb06 (patch) | |
| tree | 0df2ad192fdd3ace61a486d017073319f1665ff6 /app | |
| parent | 217c22bcd36ab689a8be1713a0f943424d6026a6 (diff) | |
| download | mullvadvpn-12d85dfdc71fddb2a6228afd2e0917666415eb06.tar.xz mullvadvpn-12d85dfdc71fddb2a6228afd2e0917666415eb06.zip | |
Migrate to connected-react-router
Since react-router-redux is deprecated
Diffstat (limited to 'app')
| -rw-r--r-- | app/app.js | 2 | ||||
| -rw-r--r-- | app/containers/AccountPage.js | 2 | ||||
| -rw-r--r-- | app/containers/AdvancedSettingsPage.js | 2 | ||||
| -rw-r--r-- | app/containers/ConnectPage.js | 2 | ||||
| -rw-r--r-- | app/containers/LoginPage.js | 2 | ||||
| -rw-r--r-- | app/containers/PreferencesPage.js | 2 | ||||
| -rw-r--r-- | app/containers/SelectLocationPage.js | 2 | ||||
| -rw-r--r-- | app/containers/SettingsPage.js | 2 | ||||
| -rw-r--r-- | app/containers/SupportPage.js | 2 | ||||
| -rw-r--r-- | app/redux/store.js | 9 |
10 files changed, 14 insertions, 13 deletions
diff --git a/app/app.js b/app/app.js index eb9c9c2647..501bfac780 100644 --- a/app/app.js +++ b/app/app.js @@ -3,7 +3,7 @@ import React from 'react'; import { bindActionCreators } from 'redux'; import { Provider } from 'react-redux'; -import { ConnectedRouter, push as pushHistory } from 'react-router-redux'; +import { ConnectedRouter, push as pushHistory } from 'connected-react-router'; import { createMemoryHistory } from 'history'; import { webFrame, ipcRenderer } from 'electron'; diff --git a/app/containers/AccountPage.js b/app/containers/AccountPage.js index a85ad3d43f..078c893748 100644 --- a/app/containers/AccountPage.js +++ b/app/containers/AccountPage.js @@ -3,7 +3,7 @@ import { remote } from 'electron'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import Account from '../components/Account'; import accountActions from '../redux/account/actions'; import { links } from '../config'; diff --git a/app/containers/AdvancedSettingsPage.js b/app/containers/AdvancedSettingsPage.js index 357cafdfee..9f88228cc3 100644 --- a/app/containers/AdvancedSettingsPage.js +++ b/app/containers/AdvancedSettingsPage.js @@ -1,7 +1,7 @@ // @flow import { connect } from 'react-redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import { AdvancedSettings } from '../components/AdvancedSettings'; import RelaySettingsBuilder from '../lib/relay-settings-builder'; import { log } from '../lib/platform'; diff --git a/app/containers/ConnectPage.js b/app/containers/ConnectPage.js index 7966a2fa04..6f906f1c82 100644 --- a/app/containers/ConnectPage.js +++ b/app/containers/ConnectPage.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push as pushHistory } from 'react-router-redux'; +import { push as pushHistory } from 'connected-react-router'; import { links } from '../config'; import Connect from '../components/Connect'; import connectActions from '../redux/connection/actions'; diff --git a/app/containers/LoginPage.js b/app/containers/LoginPage.js index 248c30ec1b..74823f3925 100644 --- a/app/containers/LoginPage.js +++ b/app/containers/LoginPage.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import Login from '../components/Login'; import accountActions from '../redux/account/actions'; import { links } from '../config'; diff --git a/app/containers/PreferencesPage.js b/app/containers/PreferencesPage.js index e11655f3a4..8534a70d74 100644 --- a/app/containers/PreferencesPage.js +++ b/app/containers/PreferencesPage.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import Preferences from '../components/Preferences'; import { log, getOpenAtLogin, setOpenAtLogin } from '../lib/platform'; diff --git a/app/containers/SelectLocationPage.js b/app/containers/SelectLocationPage.js index affe04dfc0..6307e9421b 100644 --- a/app/containers/SelectLocationPage.js +++ b/app/containers/SelectLocationPage.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import SelectLocation from '../components/SelectLocation'; import RelaySettingsBuilder from '../lib/relay-settings-builder'; import { log } from '../lib/platform'; diff --git a/app/containers/SettingsPage.js b/app/containers/SettingsPage.js index 2c68fea676..8ffd0691fd 100644 --- a/app/containers/SettingsPage.js +++ b/app/containers/SettingsPage.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import Settings from '../components/Settings'; import { links } from '../config'; import { getAppVersion, openLink, exit } from '../lib/platform'; diff --git a/app/containers/SupportPage.js b/app/containers/SupportPage.js index c80e9508de..ffab2d2095 100644 --- a/app/containers/SupportPage.js +++ b/app/containers/SupportPage.js @@ -1,7 +1,7 @@ // @flow import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { push } from 'react-router-redux'; +import { push } from 'connected-react-router'; import Support from '../components/Support'; import { openItem } from '../lib/platform'; import { collectProblemReport, sendProblemReport } from '../lib/problem-report'; diff --git a/app/redux/store.js b/app/redux/store.js index 0070248099..87133c8461 100644 --- a/app/redux/store.js +++ b/app/redux/store.js @@ -1,6 +1,6 @@ // @flow import { createStore, applyMiddleware, combineReducers, compose } from 'redux'; -import { routerMiddleware, routerReducer, push, replace } from 'react-router-redux'; +import { routerMiddleware, connectRouter, push, replace } from 'connected-react-router'; import thunk from 'redux-thunk'; import account from './account/reducers'; @@ -57,7 +57,6 @@ export default function configureStore( connection, settings, support, - router: routerReducer, }; const middlewares = [thunk, router]; @@ -72,8 +71,10 @@ export default function configureStore( const enhancer = composeEnhancers(applyMiddleware(...middlewares)); const rootReducer = combineReducers(reducers); + const rootReducerWithRouter = connectRouter(routerHistory)(rootReducer); if (initialState) { - return createStore(rootReducer, initialState, enhancer); + return createStore(rootReducerWithRouter, initialState, enhancer); + } else { + return createStore(rootReducerWithRouter, enhancer); } - return createStore(rootReducer, enhancer); } |
