mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-14 01:37:48 -05:00
Gettign going
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
|
||||
import { createBrowserHistory } from 'history'
|
||||
import { applyMiddleware, compose, createStore } from 'redux'
|
||||
import { routerMiddleware } from 'connected-react-router'
|
||||
import { createRouterMiddleware } from '@lagunovsky/redux-react-router'
|
||||
import createRootReducer from './reducers'
|
||||
import thunk from 'redux-thunk';
|
||||
import { apiSlice } from '../features/api/apiSlice'
|
||||
|
||||
export const history = createBrowserHistory()
|
||||
|
||||
@@ -15,12 +16,14 @@ export default function configureStore(preloadedState) {
|
||||
preloadedState,
|
||||
compose(
|
||||
applyMiddleware(
|
||||
routerMiddleware(history), // for dispatching history actions
|
||||
createRouterMiddleware(history), // for dispatching history actions
|
||||
thunk,
|
||||
apiSlice.middleware,
|
||||
// ... other middlewares ...
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
return store
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user