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; export type AppState = ReturnType; export type AppThunk = ThunkAction< ReturnType, AppState, unknown, Action >; export const wrapper = createWrapper(makeStore);