department-of-veterans-affairs/vets-website

View on GitHub
src/applications/mhv-medical-records/reducers/images.js

Summary

Maintainability
A
1 hr
Test Coverage

Function imagesReducer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const imagesReducer = (state = initialState, action) => {
  switch (action.type) {
    case Actions.Images.REQUEST_IMAGE_STUDY: {
      return {
        ...state,
Severity: Minor
Found in src/applications/mhv-medical-records/reducers/images.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          return {
            ...state,
            imageRequestApiFailed: action?.payload ?? false,
          };
    Severity: Major
    Found in src/applications/mhv-medical-records/reducers/images.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status