web-installer/src/redux/reducers/generalReducer.js
// Reducers to add and remove system configurations from global state
Reducers to add and remove system configurations from global state
Reducers to add and remove system configurations from global state
function systemsById(state = {}, action) {
  switch (action.type) {
    case ADD_SYSTEM:
      return {
        ...state,
        [action.payload.id]: action.payload,
      };
    case REMOVE_SYSTEM:
      return _.omit(state, action.payload.id);
    default:
      return state;
  }
}
function systemsById ( state = { } , action ) { switch ( action . type ) { case ADD_SYSTEM : return { ... state , [ action . payload . id ] : action . payload , } ; case REMOVE_SYSTEM : return _ . omit ( state , action . payload . id ) ; default : return state ; } }
Reducers to add and remove system configurations from global state
Reducers to add and remove system configurations from global state