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.
23 lines
577 B
23 lines
577 B
import {Action, configureStore, ThunkAction} from "@reduxjs/toolkit";
|
|
import {searchSlice} from "./searchSlice";
|
|
import {createWrapper} from "next-redux-wrapper";
|
|
|
|
const makeStore = () =>
|
|
configureStore({
|
|
reducer: {
|
|
[searchSlice.name]: searchSlice.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);
|