{"size": 312, "ext": "js", "max_stars_repo_path": "React/Redux/practice/redux-counter/src/reducers/color.js", "max_stars_repo_name": "huusz/frontstudy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "React/Redux/practice/redux-counter/src/reducers/color.js", "max_issues_repo_name": "huusz/frontstudy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "React/Redux/practice/redux-counter/src/reducers/color.js", "max_forks_repo_name": "huusz/frontstudy", "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": 16.4210526316, "max_line_length": 49, "alphanum_fraction": 0.5993589744}
import * as types from '../actions/ActionTypes';

const initialState = {
  color: 'black',
};

const color = (state = initialState, action) => {
  switch (action.type) {
    case types.SET_COLOR:
      return {
        color: action.color,
      };
    default:
      return state;
  }
};

export default color;
