Skip to content

Commit

Permalink
feat: add messagesApi to store
Browse files Browse the repository at this point in the history
  • Loading branch information
SplitCode committed Oct 4, 2024
1 parent f29f01f commit f3a1b8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/store/store.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { configureStore } from '@reduxjs/toolkit';
import { channelsApi } from '../api/channelsApi';
import { messagesApi } from '../api/messagesApi';

import authReducer from './slices/authSlice';

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;

0 comments on commit f3a1b8e

Please sign in to comment.