2023-07-03 21:22:31 +08:00
|
|
|
import { configureStore } from "@reduxjs/toolkit";
|
2023-07-06 21:13:02 +08:00
|
|
|
import StatusReducer from "../slices/StatusSlice/StatusSlice";
|
2023-07-06 20:56:19 +08:00
|
|
|
import UserReducer from "../slices/UserSlice/UserSlice";
|
2023-07-03 21:22:31 +08:00
|
|
|
|
|
|
|
const store = configureStore({
|
|
|
|
reducer: {
|
2023-07-06 21:13:02 +08:00
|
|
|
status: StatusReducer,
|
2023-07-06 20:56:19 +08:00
|
|
|
user: UserReducer,
|
2023-07-03 21:22:31 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default store;
|
|
|
|
|
|
|
|
// Infer the `RootState` and `AppDispatch` types from the store itself
|
|
|
|
export type RootState = ReturnType<typeof store.getState>;
|
|
|
|
export type AppDispatch = typeof store.dispatch;
|