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

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

    default:
      return state;
  }
};

export const setGraphData = (graphData) => ({
  type: "setGraphData",
  payload: graphData,
});