{"size": 530, "ext": "js", "max_stars_repo_path": "reducers/record.js", "max_stars_repo_name": "wanyine/vr-store-crm", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "reducers/record.js", "max_issues_repo_name": "wanyine/vr-store-crm", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "reducers/record.js", "max_forks_repo_name": "wanyine/vr-store-crm", "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.3846153846, "max_line_length": 65, "alphanum_fraction": 0.7094339623}

const SET_RECORD_GROUPS = "SET_RECORD_GROUPS"
const SELECT_DATE ="SELECT_DATE"
const SELECT_PERIOD ="SELECT_PERIOD"

const handlers = {
  [SET_RECORD_GROUPS](state, recordGroups){
    return Object.assign({}, state, {recordGroups})
  }
}

export const actions = {
  setRecordGroups(groups){
    return {
      type:SET_RECORD_GROUPS,
      value:groups
    }
  }
}


export default function reducer(state={recordGroups:[]}, action){
  let handler = handlers[action.type]
  return handler ? handler(state, action.value) : state
}
