30 lines
945 B
TypeScript
30 lines
945 B
TypeScript
import { configureStore } from '@reduxjs/toolkit';
|
|
import styleReducer from './styleSlice';
|
|
import mainReducer from './mainSlice';
|
|
import authSlice from './authSlice';
|
|
import openAiSlice from './openAiSlice';
|
|
|
|
import usersSlice from './users/usersSlice';
|
|
import studentsSlice from './students/studentsSlice';
|
|
import rolesSlice from './roles/rolesSlice';
|
|
import permissionsSlice from './permissions/permissionsSlice';
|
|
|
|
export const store = configureStore({
|
|
reducer: {
|
|
style: styleReducer,
|
|
main: mainReducer,
|
|
auth: authSlice,
|
|
openAi: openAiSlice,
|
|
|
|
users: usersSlice,
|
|
students: studentsSlice,
|
|
roles: rolesSlice,
|
|
permissions: permissionsSlice,
|
|
},
|
|
});
|
|
|
|
// Infer the `RootState` and `AppDispatch` types from the store itself
|
|
export type RootState = ReturnType<typeof store.getState>;
|
|
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
|
|
export type AppDispatch = typeof store.dispatch;
|