{"size": 432, "ext": "js", "max_stars_repo_path": "app/components/Progress/reducer.js", "max_stars_repo_name": "PCmyfriend/EllegiaUI", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/components/Progress/reducer.js", "max_issues_repo_name": "PCmyfriend/EllegiaUI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/components/Progress/reducer.js", "max_forks_repo_name": "PCmyfriend/EllegiaUI", "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": 20.5714285714, "max_line_length": 57, "alphanum_fraction": 0.6805555556}
import { fromJS } from 'immutable';

import { SHOW_LOADING, HIDE_LOADING } from './constants';

const initialState = fromJS({
  loading: false,
});

function progressReducer(state = initialState, action) {
  switch (action.type) {
    case SHOW_LOADING:
      return state.set('loading', true);
    case HIDE_LOADING:
      return state.set('loading', false);
    default:
      return state;
  }
}

export default progressReducer;
