
const initialState = {
    attendenceAnomolyData : [],
    partABatchAnomolyData : [],
    systemNumber : null,
    playGroundQuery : null,
    playGroundResults : [],
    playGroundtotalPages : 0,
    playGroundCurrentPage : 0
  };
  
  const reducer = (state = initialState, action) => {
    switch (action.type) {
      case 'UPDATE_ATTENDENCE_ANOMOLY_DATA':
        return { ...state, attendenceAnomolyData:action?.payload};
      case 'UPDATE_PART-A_ANOMOLY_DATA':
        return { ...state, partABatchAnomolyData:action?.payload};
      case 'UPDATE_SYSTEM_NO':
        return { ...state,systemNumber:action?.payload}
      case 'UPDATE_PLAYGROUND_QUERY':
        return { ...state,playGroundQuery:action?.payload}
      case 'UPDATE_PLAYGROUND_RESULTS':
        return { ...state,playGroundResults:action?.payload}
      case 'UPDATE_PLAYGROUND_PAGENO':
        return { ...state,playGroundtotalPages:action?.payload}
      case 'UPDATE_PLAYGROUND_TOTAL_PAGES':
        return { ...state,playGroundCurrentPage:action?.payload}
      default:
        return state;
    }
  };
  
  export default reducer;
  