{"size": 449, "ext": "js", "max_stars_repo_path": "chrome/src/background/reducers/auth.js", "max_stars_repo_name": "setlife-network/setbounty-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "chrome/src/background/reducers/auth.js", "max_issues_repo_name": "setlife-network/setbounty-api", "max_issues_repo_issues_event_min_datetime": "2018-10-03T10:07:00.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-12T17:18:32.000Z", "max_forks_repo_path": "chrome/src/background/reducers/auth.js", "max_forks_repo_name": "setlife-network/setbounty", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 17, "max_forks_count": null, "avg_line_length": 18.7083333333, "max_line_length": 50, "alphanum_fraction": 0.4521158129}
const initialState = {
    loggedInUser: {
        id: null
    }
};

export default (state = initialState, action) => {
    switch (action.type) {
    case 'RECEIVE_USER':
        return {
            ...state,
            loggedInUser: action.user
        };
    case 'RESET_AUTH_STATE':
        return {
            ...state,
            loggedInUser: {
                id: null,
            }
        };
    default:
        return state
    }
}