diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-12-15 21:32:51 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-12-15 21:32:51 +0100 |
| commit | e0b0b2f976c61225a178c7715caf2656a1f6741f (patch) | |
| tree | 78a0e5c861462822d212c065f0825c906209bfe9 /scraper/client/store.js | |
| parent | c5b02ffab8d388e8a2925e51736b902a48a95e71 (diff) | |
moving stuff
Diffstat (limited to 'scraper/client/store.js')
| -rw-r--r-- | scraper/client/store.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/scraper/client/store.js b/scraper/client/store.js deleted file mode 100644 index 043af351..00000000 --- a/scraper/client/store.js +++ /dev/null @@ -1,38 +0,0 @@ -import { applyMiddleware, compose, combineReducers, createStore } from 'redux' -import { connectRouter, routerMiddleware } from 'connected-react-router' -import { createBrowserHistory } from 'history' -import thunk from 'redux-thunk' -import { login } from './util' - -import metadataReducer from './metadata/metadata.reducer' -import searchReducer from './search/search.reducer' -import reviewReducer from './review/review.reducer' - -const rootReducer = combineReducers({ - auth: (state = login()) => state, - metadata: metadataReducer, - search: searchReducer, - review: reviewReducer, -}) - -function configureStore(initialState = {}, history) { - const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose - - const store = createStore( - connectRouter(history)(rootReducer), // new root reducer with router state - initialState, - composeEnhancers( - applyMiddleware( - thunk, - routerMiddleware(history) - ), - ), - ) - - return store -} - -const history = createBrowserHistory() -const store = configureStore({}, history) - -export { store, history } |
