{"size": 871, "ext": "js", "max_stars_repo_path": "src/reducers/authReducer.js", "max_stars_repo_name": "efthimispegas/project-planner", "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": "efthimispegas/project-planner", "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": "efthimispegas/project-planner", "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": 17.42, "max_line_length": 52, "alphanum_fraction": 0.5132032147}
const initState = {};

const authReducer = (state = initState, action) => {
  switch (action.type) {
    case 'LOGIN_SUCCESS':
      console.log('login success');
      return {
        ...state,
        authError: null
      };

    case 'LOGIN_FAIL':
      console.log('login fail');
      return {
        ...state,
        authError: action.error
      };

    case 'SIGNUP_SUCCESS':
      console.log('sign up success');
      return {
        ...state,
        authError: null
      };

    case 'SIGNUP_FAIL':
      console.log('sign up fail');
      return {
        ...state,
        authError: action.error
      };

    case 'SIGNOUT_SUCCESS':
      console.log('singout success');
      return {
        ...state
      };

    case 'SIGNOUT_FAIL':
      return {
        ...state
      };

    default:
      return state;
  }
};

export default authReducer;
