2025-05-24 09:29:17 +00:00

40 lines
1.3 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 agentsSlice from './agents/agentsSlice';
import bookingsSlice from './bookings/bookingsSlice';
import customersSlice from './customers/customersSlice';
import paymentsSlice from './payments/paymentsSlice';
import vouchersSlice from './vouchers/vouchersSlice';
import rolesSlice from './roles/rolesSlice';
import permissionsSlice from './permissions/permissionsSlice';
import loyaltytierSlice from './loyaltytier/loyaltytierSlice';
export const store = configureStore({
reducer: {
style: styleReducer,
main: mainReducer,
auth: authSlice,
openAi: openAiSlice,
users: usersSlice,
agents: agentsSlice,
bookings: bookingsSlice,
customers: customersSlice,
payments: paymentsSlice,
vouchers: vouchersSlice,
roles: rolesSlice,
permissions: permissionsSlice,
loyaltytier: loyaltytierSlice,
},
});
// 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;