oysterprotocol/webinterface

View on GitHub
src/redux/reducers/upload-reducer.tsx

Summary

Maintainability
A
2 hrs
Test Coverage

Function uploadReducer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const uploadReducer = (state = initState, action) => {
  switch (action.type) {
    case navigationActions.VISIT_UPLOAD_FORM:
      return initState; // resets state.

Severity: Minor
Found in src/redux/reducers/upload-reducer.tsx - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          return { ...state, handle: handle, uploadProgress: 100 };
    Severity: Major
    Found in src/redux/reducers/upload-reducer.tsx - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status