diff options
| author | lens <lens@neural.garden> | 2020-12-26 20:59:17 +0000 |
|---|---|---|
| committer | lens <lens@neural.garden> | 2020-12-26 20:59:17 +0000 |
| commit | 7c15f34186622410e25ee85c01d832e48e012140 (patch) | |
| tree | e0a8dbd5e7b6a3936e7b9a666c2622ecc7ff1a65 /frontend/site/store.js | |
| parent | 94234db6a771f687788d3decc6dd1ba01731f7af (diff) | |
| parent | 85bfb949fea4e69dabc5b7544ce70d26d3d11393 (diff) | |
Merge branch 'master' of asdf.us:swimmer
Diffstat (limited to 'frontend/site/store.js')
| -rw-r--r-- | frontend/site/store.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/frontend/site/store.js b/frontend/site/store.js deleted file mode 100644 index cd77990..0000000 --- a/frontend/site/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 siteReducer from './site/site.reducer' - -const createRootReducer = history => ( - combineReducers({ - auth: (state = {}) => state, - router: connectRouter(history), - site: siteReducer, - }) -) - -const configureStore = (initialState = {}, history) => { - const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose - - const store = createStore( - createRootReducer(history), - initialState, - composeEnhancers( - applyMiddleware( - thunk, - routerMiddleware(history) - ), - ), - ) - - return store -} - -const history = createBrowserHistory() -const store = configureStore({}, history) -const { dispatch } = store - -export { store, history, dispatch } |
