atlp-rwanda/atlp-devpulse-fn

View on GitHub
src/pages/Trash/Trash.tsx

Summary

Maintainability
C
1 day
Test Coverage

Function Trash has 320 lines of code (exceeds 200 allowed). Consider refactoring.
Open

const Trash = (props: any) => {
  const { allTrainees, restore, clearTrashMessage} = props;
  const [pageIdx] = useState(1);
  const [itemsPerPage] = useState(100);
  const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
Severity: Major
Found in src/pages/Trash/Trash.tsx - About 5 hrs to fix

    File Trash.tsx has 351 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React, { useEffect, useState, useMemo } from "react";
    import { getAllSoftDeletedTrainees } from "../../redux/actions/softDeletedTraineesActions";
    import { restoretraine } from "../../redux/actions/restoreDelTrainee";
    import { connect } from "react-redux";
    import { useTable, usePagination, useRowSelect } from "react-table";
    Severity: Minor
    Found in src/pages/Trash/Trash.tsx - About 4 hrs to fix

      There are no issues that match your filters.

      Category
      Status