coronasafe/care_fe

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

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 3 of 3 total issues

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

export default function OrganizationLayout({
id,
navOrganizationId,
children,
setOrganization,
Severity: Minor
Found in src/pages/Organization/components/OrganizationLayout.tsx - About 1 hr to fix

Similar blocks of code found in 3 locations. Consider refactoring.
Open

<div className="flex items-center text-base">
<CareIcon icon={item.icon} className="mr-2 size-4" />
{item.title}
</div>
Severity: Major
Found in src/pages/Organization/components/OrganizationLayout.tsx and 2 other locations - About 40 mins to fix
src/components/ui/sidebar/patient-switcher.tsx on lines 108..111
src/pages/Facility/settings/devices/components/DeviceSelector.tsx on lines 109..112

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<BreadcrumbItem key={org.id}>
<span className="text-sm font-semibold text-gray-900">
{org.name}
</span>
</BreadcrumbItem>
Severity: Minor
Found in src/pages/Organization/components/OrganizationLayout.tsx and 1 other location - About 40 mins to fix
src/components/Patient/PatientDetailsTab/PatientUsers.tsx on lines 296..300

There are no issues that match your filters.

Category
Status