32 lines
914 B
TypeScript
32 lines
914 B
TypeScript
import { configureStore } from "@reduxjs/toolkit";
|
|
|
|
import headerSlice from "./slices/headerSlice";
|
|
import homeSlice from "./slices/homeSlice";
|
|
import contactsSlice from "./slices/contactsSlice";
|
|
import faqSlice from "./slices/faqSlice";
|
|
import bidSlice from "./slices/bidSlice";
|
|
import inputSlice from "./slices/inputSlice";
|
|
import burgerSlice from "./slices/burgerSlice";
|
|
import aboutSlice from "./slices/aboutus";
|
|
|
|
export const makeStore = () => {
|
|
return configureStore({
|
|
reducer: {
|
|
headerSlice,
|
|
homeSlice,
|
|
contactsSlice,
|
|
faqSlice,
|
|
bidSlice,
|
|
inputSlice,
|
|
burgerSlice,
|
|
aboutSlice,
|
|
},
|
|
});
|
|
};
|
|
|
|
// Infer the type of makeStore
|
|
export type AppStore = ReturnType<typeof makeStore>;
|
|
// Infer the `RootState` and `AppDispatch` types from the store itself
|
|
export type RootState = ReturnType<AppStore["getState"]>;
|
|
export type AppDispatch = AppStore["dispatch"];
|