web-installer/src/redux/reducers/chainlinkChainsReducer.js
// Reducers to add and remove from list of all chainlink nodes
Reducers to add and remove from list of all chainlink nodes
Reducers to add and remove from list of all chainlink nodes
function allNodes(state = [], action) {
  switch (action.type) {
    case ADD_NODE_CHAINLINK:
      if (state.includes(action.payload.id)) {
        return state;
      }
      return state.concat(action.payload.id);
    case REMOVE_NODE_CHAINLINK:
      return state.filter((config) => config !== action.payload.id);
    default:
      return state;
  }
}
function allNodes ( state = [ ] , action ) { switch ( action . type ) { case ADD_NODE_CHAINLINK : if ( state . includes ( action . payload . id ) ) { return state ; } return state . concat ( action . payload . id ) ; case REMOVE_NODE_CHAINLINK : return state . filter ( ( config ) => config !== action . payload . id ) ; default : return state ; } }
Reducers to add and remove from list of all chainlink nodes
Reducers to add and remove from list of all chainlink nodes