coronasafe/care_fe

View on GitHub
src/pages/Organization/components/GovtOrganizationSelector.tsx

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Function GovtOrganizationSelector has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function GovtOrganizationSelector(
props: GovtOrganizationSelectorProps,
) {
const { onChange, required, selected, authToken } = props;
const [selectedLevels, setSelectedLevels] = useState<Organization[]>([]);
Severity: Major
Found in src/pages/Organization/components/GovtOrganizationSelector.tsx - About 2 hrs to fix

Function OrganizationLevelSelect has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function OrganizationLevelSelect({
index,
currentLevel,
previousLevel,
onChange,
Severity: Minor
Found in src/pages/Organization/components/GovtOrganizationSelector.tsx - About 1 hr to fix

Function GovtOrganizationSelector has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export default function GovtOrganizationSelector(
props: GovtOrganizationSelectorProps,
) {
const { onChange, required, selected, authToken } = props;
const [selectedLevels, setSelectedLevels] = useState<Organization[]>([]);
Severity: Minor
Found in src/pages/Organization/components/GovtOrganizationSelector.tsx - About 1 hr to fix
Category
Status