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

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

    default:
      return state;
  }
};

export const setCounts = (counts) => ({
  type: "setCounts",
  payload: counts,
});