diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-04-24 15:36:40 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-04-27 15:07:48 +0200 |
| commit | d464b82888a176dd5f32e5ffb8e6d6dd6f0ca04d (patch) | |
| tree | 0a3a76e0612320c6577adeea23845fdd5794cdec /gui/src | |
| parent | 4f1d2ba90546907e9905ac9ec72731613e559294 (diff) | |
| download | mullvadvpn-d464b82888a176dd5f32e5ffb8e6d6dd6f0ca04d.tar.xz mullvadvpn-d464b82888a176dd5f32e5ffb8e6d6dd6f0ca04d.zip | |
Upgrade redux, react-redux, react-router and connected-react-router
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/context.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/redux/store.ts | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/gui/src/renderer/context.tsx b/gui/src/renderer/context.tsx index e54f16b1ea..4a905be6b1 100644 --- a/gui/src/renderer/context.tsx +++ b/gui/src/renderer/context.tsx @@ -10,7 +10,7 @@ if (process.env.NODE_ENV === 'development') { AppContext.displayName = 'AppContext'; } -export default function withAppContext<Props>(BaseComponent: React.ComponentClass<Props>) { +export default function withAppContext<Props>(BaseComponent: React.ComponentType<Props>) { // Exclude the IAppContext from props since those are injected props const wrappedComponent = (props: Omit<Props, keyof IAppContext>) => { return ( diff --git a/gui/src/renderer/redux/store.ts b/gui/src/renderer/redux/store.ts index 3af628ccd4..bedaddf1bd 100644 --- a/gui/src/renderer/redux/store.ts +++ b/gui/src/renderer/redux/store.ts @@ -1,5 +1,5 @@ import { connectRouter, push, replace, routerMiddleware } from 'connected-react-router'; -import { applyMiddleware, combineReducers, compose, createStore, Dispatch, Store } from 'redux'; +import { applyMiddleware, combineReducers, compose, createStore, Dispatch } from 'redux'; import accountActions, { AccountAction } from './account/actions'; import accountReducer, { IAccountReduxState } from './account/reducers'; @@ -32,13 +32,10 @@ export type ReduxAction = | SupportAction | VersionAction | UserInterfaceAction; -export type ReduxStore = Store<IReduxState, ReduxAction>; +export type ReduxStore = ReturnType<typeof configureStore>; export type ReduxDispatch = Dispatch<ReduxAction>; -export default function configureStore( - routerHistory: History, - initialState?: IReduxState, -): ReduxStore { +export default function configureStore(routerHistory: History, initialState?: IReduxState) { const actionCreators = { ...accountActions, ...connectionActions, |
