diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index ce476d8..faf8dca 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -1,5 +1,6 @@ import { configureStore } from '@reduxjs/toolkit'; import { channelsApi } from '../api/channelsApi'; +import { messagesApi } from '../api/messagesApi'; import authReducer from './slices/authSlice'; @@ -7,8 +8,10 @@ const store = configureStore({ reducer: { auth: authReducer, [channelsApi.reducerPath]: channelsApi.reducer, + [messagesApi.reducerPath]: messagesApi.reducer, }, - middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(channelsApi.middleware), + middleware: (getDefaultMiddleware) => getDefaultMiddleware() + .concat(channelsApi.middleware, messagesApi.middleware), }); export default store;