coronasafe/care_fe

View on GitHub
src/pages/PublicAppointments/Success.tsx

Summary

Maintainability
B
5 hrs
Test Coverage

Showing 3 of 3 total issues

Function AppointmentSuccess has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function AppointmentSuccess(props: { appointmentId: string }) {
const { appointmentId } = props;
const { t } = useTranslation();
 
const patientUserContext = usePatientContext();
Severity: Major
Found in src/pages/PublicAppointments/Success.tsx - About 2 hrs to fix

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

<div>
<h2 className="text-sm font-medium text-gray-500 mb-1">
{t("time")}:
</h2>
<p className="text-lg font-medium">{appointmentTimeSlot}</p>
Severity: Major
Found in src/pages/PublicAppointments/Success.tsx and 1 other location - About 1 hr to fix
src/pages/PublicAppointments/Success.tsx on lines 79..84

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

<div>
<h2 className="text-sm font-medium text-gray-500 mb-1">
{t("date")}:
</h2>
<p className="text-lg font-medium">{appointmentDate}</p>
Severity: Major
Found in src/pages/PublicAppointments/Success.tsx and 1 other location - About 1 hr to fix
src/pages/PublicAppointments/Success.tsx on lines 86..91
Category
Status