{"size": 376, "ext": "js", "max_stars_repo_path": "src/plugins/series/data/shows/reducer.js", "max_stars_repo_name": "mofr/webui", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/plugins/series/data/shows/reducer.js", "max_issues_repo_name": "mofr/webui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/plugins/series/data/shows/reducer.js", "max_forks_repo_name": "mofr/webui", "max_forks_repo_forks_event_min_datetime": "2018-07-25T15:04:34.000Z", "max_forks_repo_forks_event_max_datetime": "2018-07-25T15:04:34.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 19.7894736842, "max_line_length": 71, "alphanum_fraction": 0.6143617021}
import { GET_SHOWS } from 'plugins/series/data/shows/actions';

const initState = {
  totalCount: 0,
  items: [],
};

export default function reducer(state = initState, { type, payload }) {
  switch (type) {
    case GET_SHOWS:
      return {
        totalCount: payload.headers.get('total-count'),
        items: payload.data,
      };
    default:
      return state;
  }
}
