department-of-veterans-affairs/vets-website

View on GitHub
src/applications/static-pages/representative-status/hooks/useRepresentativeStatus.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function useRepresentativeStatus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function useRepresentativeStatus() {
  const [representative, setRepresentative] = useState(null);
  const [isLoading, setIsLoading] = useState(true);
  const [error, setError] = useState(null);

    Function fetchRepStatus has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const fetchRepStatus = async () => {
          setIsLoading(true);
          setError(null);
    
          try {

      There are no issues that match your filters.

      Category
      Status