github.com/wfusion/gofusion@v1.1.14/common/infra/asynq/asynqmon/ui/src/store.ts (about)

     1  import { combineReducers, configureStore } from "@reduxjs/toolkit";
     2  import settingsReducer from "./reducers/settingsReducer";
     3  import queuesReducer from "./reducers/queuesReducer";
     4  import tasksReducer from "./reducers/tasksReducer";
     5  import groupsReducer from "./reducers/groupsReducer";
     6  import serversReducer from "./reducers/serversReducer";
     7  import schedulerEntriesReducer from "./reducers/schedulerEntriesReducer";
     8  import snackbarReducer from "./reducers/snackbarReducer";
     9  import queueStatsReducer from "./reducers/queueStatsReducer";
    10  import redisInfoReducer from "./reducers/redisInfoReducer";
    11  import metricsReducer from "./reducers/metricsReducer";
    12  import { loadState } from "./localStorage";
    13  
    14  const rootReducer = combineReducers({
    15    settings: settingsReducer,
    16    queues: queuesReducer,
    17    tasks: tasksReducer,
    18    groups: groupsReducer,
    19    servers: serversReducer,
    20    schedulerEntries: schedulerEntriesReducer,
    21    snackbar: snackbarReducer,
    22    queueStats: queueStatsReducer,
    23    redis: redisInfoReducer,
    24    metrics: metricsReducer,
    25  });
    26  
    27  const preloadedState = loadState();
    28  
    29  // AppState is the top-level application state maintained by redux store.
    30  export type AppState = ReturnType<typeof rootReducer>;
    31  
    32  const store = configureStore({
    33    reducer: rootReducer,
    34    preloadedState,
    35  });
    36  
    37  export default store;