summaryrefslogtreecommitdiff
path: root/buildscripts/libdeps/graph_visualizer_web_stack/src/redux/loading.js
blob: 8b7a9c09c70a287de3d36054391a0cb052911562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { initialState } from "./store";

export const loading = (state = initialState, action) => {
  switch (action.type) {
    case "setLoading":
      return action.payload;

    default:
      return state;
  }
};

export const setLoading = (loading) => ({
  type: "setLoading",
  payload: loading,
});