department-of-veterans-affairs/vets-website

View on GitHub
src/applications/check-in/hooks/useSendTravelPayClaim.jsx

Summary

Maintainability
A
3 hrs
Test Coverage

Function useSendTravelPayClaim has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const useSendTravelPayClaim = appointment => {
  const [isLoading, setIsLoading] = useState(false);
  const [travelPayClaimError, setTravelPayClaimError] = useState(false);
  const [travelPayClaimRequested, setTravelPayClaimRequested] = useState();

Severity: Major
Found in src/applications/check-in/hooks/useSendTravelPayClaim.jsx - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

          if (
            isLoading ||
            !isTravelReimbursementEnabled ||
            travelPayClaimSent ||
            !travelPayEligible ||
    Severity: Major
    Found in src/applications/check-in/hooks/useSendTravelPayClaim.jsx - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status