loading Groups

This commit is contained in:
Luke Berndt
2022-12-31 13:56:38 -05:00
parent 931c8590db
commit 10006a106b
6 changed files with 44 additions and 60 deletions

View File

@@ -5,6 +5,8 @@ import { createBrowserHistory } from 'history'
import { applyMiddleware, compose, createStore } from 'redux'
import { routerMiddleware } from 'connected-react-router'
import createRootReducer from './reducers'
import { apiSlice } from '../features/api/apiSlice'
import thunk from 'redux-thunk';
export const history = createBrowserHistory()
@@ -18,6 +20,7 @@ export default function configureStore(preloadedState) {
applyMiddleware(
routerMiddleware(history), // for dispatching history actions
thunk,
apiSlice.middleware
// ... other middlewares ...
),
),

View File

@@ -6,11 +6,13 @@ import systemReducer from "../System/system-reducer"
import talkgroupReducer from "../Talkgroups/talkgroup-reducer"
import groupReducer from "../Group/group-reducer"
import callReducer from "../Call/call-reducer"
import {apiSlice} from "../features/api/apiSlice"
export default (history) => combineReducers({
router: connectRouter(history),
system: systemReducer,
talkgroup: talkgroupReducer,
group: groupReducer,
call: callReducer
call: callReducer,
[apiSlice.reducerPath]: apiSlice.reducer
})