diff options
Diffstat (limited to 'frontend/src/store.ts')
-rw-r--r-- | frontend/src/store.ts | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/frontend/src/store.ts b/frontend/src/store.ts deleted file mode 100644 index 54a65509..00000000 --- a/frontend/src/store.ts +++ /dev/null @@ -1,27 +0,0 @@ -import createHistory from 'history/createBrowserHistory'; -import { routerMiddleware } from 'react-router-redux'; -import { applyMiddleware, createStore } from 'redux'; -import { composeWithDevTools } from 'redux-devtools-extension'; -import createSagaMiddleware from 'redux-saga'; -import { GlobalState } from './reducers'; -import { createReducer } from './reducers'; -import { rootSaga } from './sagas'; - -export function configureStore(initialState: GlobalState) { - const sagaMiddleware = createSagaMiddleware(); - - const history = createHistory(); - - const middlewares = [sagaMiddleware, routerMiddleware(history)]; - - const enhancers = [applyMiddleware(...middlewares)]; - - const store = createStore(createReducer(), initialState, composeWithDevTools(...enhancers)); - - sagaMiddleware.run(rootSaga); - - return { - store, - history, - }; -} |