From 61c84d35a5d4d4820cdbb8734bb10bf54a01fba2 Mon Sep 17 00:00:00 2001 From: Qolzam Date: Sat, 17 Mar 2018 19:24:12 +0700 Subject: [PATCH] [Improvement] Change configure store export --- src/index.tsx | 10 +++++----- src/store/configureStore.dev.ts | 2 +- src/store/configureStore.prod.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 186829d..c33715c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -9,7 +9,7 @@ import registerServiceWorker from './registerServiceWorker' import config from 'src/config' import { Provider } from 'react-redux' -import store, { history } from 'store/configureStore' +import configureStore from 'store/configureStore' import { ConnectedRouter } from 'react-router-redux' // - Actions @@ -21,10 +21,10 @@ import Master from 'components/master' // Set default data // tslint:disable-next-line:no-empty -store.subscribe(() => { }) +configureStore.store.subscribe(() => { }) // - Initialize languages -store.dispatch(localeActions.initTranslation()) +configureStore.store.dispatch(localeActions.initTranslation()) // Needed for onClick // http://stackoverflow.com/a/34015469/988941 @@ -47,8 +47,8 @@ import './socialEngine' const supportsHistory = 'pushState' in window.history ReactDOM.render( - - + + diff --git a/src/store/configureStore.dev.ts b/src/store/configureStore.dev.ts index 4250996..209781d 100644 --- a/src/store/configureStore.dev.ts +++ b/src/store/configureStore.dev.ts @@ -24,4 +24,4 @@ let store: redux.Store = redux.createStore(rootReducer, initialState, redux (window as any).devToolsExtension ? (window as any).devToolsExtension() : (f: any) => f )) -export default store +export default {store, history} diff --git a/src/store/configureStore.prod.ts b/src/store/configureStore.prod.ts index 566cc0b..eab074b 100644 --- a/src/store/configureStore.prod.ts +++ b/src/store/configureStore.prod.ts @@ -22,4 +22,4 @@ let store: redux.Store = redux.createStore(rootReducer, initialState, redux (window as any).devToolsExtension ? (window as any).devToolsExtension() : (f: any) => f )) -export default store +export default {store, history}