{"size": 574, "ext": "js", "max_stars_repo_path": "reactjs/src/store/reducers/performersReducer.js", "max_stars_repo_name": "Wipersee/profielp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "reactjs/src/store/reducers/performersReducer.js", "max_issues_repo_name": "Wipersee/profielp", "max_issues_repo_issues_event_min_datetime": "2021-11-15T10:20:28.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-15T10:20:28.000Z", "max_forks_repo_path": "reactjs/src/store/reducers/performersReducer.js", "max_forks_repo_name": "Wipersee/profielp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 27.3333333333, "max_line_length": 78, "alphanum_fraction": 0.6027874564}
let initialState = {
    data: [],
    loading: false,
    hasErrors: false,
};

const performersReducer = (state = initialState, action) => {
    switch (action.type) {
        case "GET_PERFORMERS_DATA":
            return { ...state, loading: true };
        case "GET_PERFORMERS_DATA_SUCCESS":
            return { data: action.payload, loading: false, hasErrors: false };
        case "GET_PERFORMERS_DATA_FAILURE":
            return { ...state, loading: false, hasErrors: true };
        default:
            return state;
    }
};

export default performersReducer;
