{"size": 1473, "ext": "js", "max_stars_repo_path": "src/redux/reducers/differentialExpression/index.js", "max_stars_repo_name": "biomage-ltd/ui", "max_stars_repo_stars_event_min_datetime": "2020-12-07T14:43:07.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-19T20:44:25.000Z", "max_issues_repo_path": "src/redux/reducers/differentialExpression/index.js", "max_issues_repo_name": "biomage-ltd/ui", "max_issues_repo_issues_event_min_datetime": "2020-09-29T15:42:41.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-04T13:03:32.000Z", "max_forks_repo_path": "src/redux/reducers/differentialExpression/index.js", "max_forks_repo_name": "biomage-ltd/ui", "max_forks_repo_forks_event_min_datetime": "2020-11-14T19:23:07.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-16T10:46:15.000Z"}
{"max_stars_count": 18, "max_issues_count": 304, "max_forks_count": 3, "avg_line_length": 33.4772727273, "max_line_length": 90, "alphanum_fraction": 0.7718940937}
import initialState from './initialState';
import {
  DIFF_EXPR_LOADING,
  DIFF_EXPR_LOADED,
  DIFF_EXPR_ERROR,
  DIFF_EXPR_COMPARISON_TYPE_SET,
  DIFF_EXPR_COMPARISON_GROUP_SET,
} from '../../actionTypes/differentialExpression';
import { EXPERIMENT_SETTINGS_PIPELINE_START } from '../../actionTypes/experimentSettings';

import differentialExpressionLoading from './differentialExpressionLoading';
import differentialExpressionLoaded from './differentialExpressionLoaded';
import differentialExpressionError from './differentialExpressionError';
import differentialExpressionSetType from './differentialExpressionSetType';
import differentialExpressionSetGroup from './differentialExpressionSetGroup';

const differentialExpressionReducer = (state = initialState, action) => {
  switch (action.type) {
    case DIFF_EXPR_LOADING: {
      return differentialExpressionLoading(state, action);
    }
    case DIFF_EXPR_LOADED: {
      return differentialExpressionLoaded(state, action);
    }
    case DIFF_EXPR_ERROR: {
      return differentialExpressionError(state, action);
    }
    case DIFF_EXPR_COMPARISON_TYPE_SET: {
      return differentialExpressionSetType(state, action);
    }
    case DIFF_EXPR_COMPARISON_GROUP_SET: {
      return differentialExpressionSetGroup(state, action);
    }
    case EXPERIMENT_SETTINGS_PIPELINE_START: {
      return initialState;
    }
    default: {
      return state;
    }
  }
};

export default differentialExpressionReducer;
