prometheus/web/ui/mantine-ui/src/state/store.ts
Julius Volz 2bb14c5787 Lots of more progress on the new Mantine UI
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-03-07 13:16:54 +01:00

20 lines
664 B
TypeScript

import { configureStore } from "@reduxjs/toolkit";
import queryPageSlice from "./queryPageSlice";
import { prometheusApi } from "./api";
const store = configureStore({
reducer: {
queryPage: queryPageSlice,
[prometheusApi.reducerPath]: prometheusApi.reducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(prometheusApi.middleware),
});
// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>;
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch;
export default store;