You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nx-guitar-school/apps/website/store/store.ts

26 lines
701 B

import {Action, configureStore, ThunkAction} from "@reduxjs/toolkit";
import {createWrapper} from "next-redux-wrapper";
import {blogSearchSlice} from "./blogSearchSlice";
import {shopSearchSlice} from "./storeSearchSlice";
const makeStore = () =>
configureStore({
reducer: {
[blogSearchSlice.name]: blogSearchSlice.reducer,
[shopSearchSlice.name]: shopSearchSlice.reducer,
},
devTools: true,
});
export type AppStore = ReturnType<typeof makeStore>;
export type AppState = ReturnType<AppStore["getState"]>;
export type AppThunk<ReturnType = void> = ThunkAction<
ReturnType,
AppState,
unknown,
Action
>;
export const wrapper = createWrapper<AppStore>(makeStore);