const intialState = {
  sensorDataInfo: {
    sensorImageDetails: [],
  },
};

const clearState = {
  sensorDataInfo: {
    sensorImageDetails: [],
  },
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "SENSOR_DETAILS":
      return { ...state, sensorDataInfo: action.payload };
    case "CLEAR_SENSOR_DETAILS_REDUX":
      return clearState;
    default:
      return state;
  }
};
