2025-04-05 09:38:54 +00:00

34 lines
1.1 KiB
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 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<typeof store.getState>;
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch;