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 employeesSlice from './employees/employeesSlice'; import officesSlice from './offices/officesSlice'; import requestsSlice from './requests/requestsSlice'; 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, employees: employeesSlice, offices: officesSlice, requests: requestsSlice, roles: rolesSlice, permissions: permissionsSlice, }, }); // Infer the `RootState` and `AppDispatch` types from the store itself export type RootState = ReturnType; // Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState} export type AppDispatch = typeof store.dispatch;