department-of-veterans-affairs/vets-website

View on GitHub
src/applications/mhv-supply-reordering/containers/Alerts.jsx

Summary

Maintainability
A
2 hrs
Test Coverage

Function Alerts has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Alerts = () => {
  const reorderDate = useSelector(canReorderOn);
  const renderAlertDeceased = useSelector(showAlertDeceased);
  const renderAlertNoRecordForUser = useSelector(showAlertNoRecordForUser);
  const renderAlertNoSuppliesForReorder = useSelector(
Severity: Minor
Found in src/applications/mhv-supply-reordering/containers/Alerts.jsx - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

      return null;
    Severity: Major
    Found in src/applications/mhv-supply-reordering/containers/Alerts.jsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return <AlertNoSuppliesForReorder reorderDate={reorderDate} />;
      Severity: Major
      Found in src/applications/mhv-supply-reordering/containers/Alerts.jsx - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status