{"size": 628, "ext": "js", "max_stars_repo_path": "src/reducers/AuthReducer.js", "max_stars_repo_name": "bozojovicic/reactjs-boilerplate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/reducers/AuthReducer.js", "max_issues_repo_name": "bozojovicic/reactjs-boilerplate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reducers/AuthReducer.js", "max_forks_repo_name": "bozojovicic/reactjs-boilerplate", "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": 14.2727272727, "max_line_length": 38, "alphanum_fraction": 0.5557324841}

export default function reducer(state=
	{
		authData: {
			username : null,
			redirectedFrom : null,
			loadingData : false
		}
	}, action) {

	switch (action.type) {
		case "SET_USERNAME": {
			return {...state, 
				authData: {
					...state.authData,
					username: action.payload
				}
			}
		}

		case "SET_REDIRECTED_FROM": {
			return {...state, 
				authData: {
					...state.authData,
					redirectedFrom: action.payload
				}
			}
		}

		case "SET_LOADING": {
			return {...state, 
				authData: {
					...state.authData,
					loadingData: action.payload
				}
			}
		}

		default : {
			return {...state};
		}
	}

}