blob: c30a30de1c4b64e056095dfe8d79f62a0fe5c643 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import { configureStore } from '@reduxjs/toolkit';
import guestReducer from './slices/auth/guestSlice';
import adminReducer from './slices/auth/adminSlice';
import { guestSlice } from './slices/api/guestSlice';
import { adminSlice } from './slices/api/adminSlice';
const store = configureStore({
reducer: {
[guestSlice.reducerPath]: guestSlice.reducer,
[adminSlice.reducerPath]: adminSlice.reducer,
guest: guestReducer,
admin: adminReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(guestSlice.middleware, adminSlice.middleware),
});
export default store;
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
|