{"size": 1628, "ext": "js", "max_stars_repo_path": "src/reducer/DailyReport.js", "max_stars_repo_name": "kesav-m/covid-tracker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/reducer/DailyReport.js", "max_issues_repo_name": "kesav-m/covid-tracker", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reducer/DailyReport.js", "max_forks_repo_name": "kesav-m/covid-tracker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.6111111111, "max_line_length": 56, "alphanum_fraction": 0.6283783784}
import {
  FETCH_DAILY_REPORT_SUCCESS,
  FETCH_DAILY_REPORT_FAILURE,
  FETCH_HOSPITAL_DATA_SUCCESS,
  FETCH_HOSPITAL_DATA_FAILURE,
  FETCH_CONTACT_DATA_SUCCESS,
  FETCH_CONTACT_DATA_FAILURE,
  FETCH_NOTIFICATION_DATA_SUCCESS,
  FETCH_NOTIFICATION_DATA_FAILURE,
  FETCH_TESTING_DATA_SUCCESS,
  FETCH_TESTING_DATA_FAILURE
} from "../actions/DailyReport";

const INITIAL_STATE = {};

export default function(state = INITIAL_STATE, action) {
  switch (action.type) {
    case FETCH_DAILY_REPORT_SUCCESS:
      return {
        ...state,
        dailyData: action.payload
      };
    case FETCH_DAILY_REPORT_FAILURE:
      return {
        ...state,
        error: action.error
      };
    case FETCH_HOSPITAL_DATA_SUCCESS:
      return {
        ...state,
        hospitalData: action.payload
      };
    case FETCH_HOSPITAL_DATA_FAILURE:
      return {
        ...state,
        error: action.error
      };
    case FETCH_CONTACT_DATA_SUCCESS:
      return {
        ...state,
        contactData: action.payload
      };
    case FETCH_CONTACT_DATA_FAILURE:
      return {
        ...state,
        error: action.error
      };
    case FETCH_NOTIFICATION_DATA_SUCCESS:
      return {
        ...state,
        notificationData: action.payload
      };
    case FETCH_NOTIFICATION_DATA_FAILURE:
      return {
        ...state,
        error: action.error
      };
    case FETCH_TESTING_DATA_SUCCESS:
      return {
        ...state,
        testingData: action.payload
      };
    case FETCH_TESTING_DATA_FAILURE:
      return {
        ...state,
        error: action.error
      };
    default:
      return state;
  }
}
