{"size": 967, "ext": "js", "max_stars_repo_path": "client/src/usersReducer.js", "max_stars_repo_name": "JCGuest/trackerbot-heroku", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/usersReducer.js", "max_issues_repo_name": "JCGuest/trackerbot-heroku", "max_issues_repo_issues_event_min_datetime": "2020-06-28T05:33:23.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T01:33:18.000Z", "max_forks_repo_path": "client/src/usersReducer.js", "max_forks_repo_name": "JCGuest/trackerbot", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 28.4411764706, "max_line_length": 114, "alphanum_fraction": 0.41778697}
export default function usersReducer( state = { isLoggedIn: false, user: {}, loading: false, items: []}, action) {
    switch (action.type) {
        case "LOADING_STATUS":
            return {
                isLoggedIn: false,
                user: {},
                loading: true
            }
        case "LOG_IN":
            return {
                isLoggedIn: action.isLoggedIn,
                user: action.user,
                loading: false
            }
        case "LOG_OUT":
            return {
                isLoggedIn: action.isLoggedIn,
                user: action.user,
                loading: false
            }
        case "LOADING_ITEMS":
            return {
                ...state,
                loading: true
            }
        case "ADD_ITEMS":
            return {
                ...state,
                items: action.items,
                loading: action.loading
            }
        default: return state;
    };
};