2022-02-27 06:17:52 +00:00
|
|
|
import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit"
|
|
|
|
|
|
|
|
import pluginsReducer from "../slices/plugins"
|
|
|
|
import pluginsTxtReducer from "../slices/pluginsTxt"
|
|
|
|
|
|
|
|
export function makeStore() {
|
|
|
|
return configureStore({
|
|
|
|
reducer: { pluginsTxt: pluginsTxtReducer, plugins: pluginsReducer },
|
2022-03-04 03:11:40 +00:00
|
|
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }),
|
2022-02-27 06:17:52 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
const store = makeStore()
|
|
|
|
|
|
|
|
export type AppState = ReturnType<typeof store.getState>
|
|
|
|
|
|
|
|
export type AppDispatch = typeof store.dispatch
|
|
|
|
|
|
|
|
export type AppThunk<ReturnType = void> = ThunkAction<
|
|
|
|
ReturnType,
|
|
|
|
AppState,
|
|
|
|
unknown,
|
|
|
|
Action<string>
|
|
|
|
>
|
|
|
|
|
|
|
|
export default store
|