improvement: loading state added to buttons who interact with backend.

This commit is contained in:
2026-07-17 10:58:04 +03:30
parent 68fc9d5d6d
commit d2ad1fd7b6
23 changed files with 240 additions and 144 deletions

View File

@@ -319,7 +319,7 @@ export function AppointmentBookingModal({
<Button
type="button"
variant="danger"
onClick={() => void onDelete()}
onClick={() => onDelete()}
disabled={loading || deleting}
isLoading={deleting}
fullWidth
@@ -342,7 +342,7 @@ export function AppointmentBookingModal({
<Button
type="button"
variant="primary"
onClick={() => void handleSubmit()}
onClick={() => handleSubmit()}
isLoading={loading}
disabled={deleting}
fullWidth

View File

@@ -285,7 +285,7 @@ export function AppointmentsPage() {
!!activeEditingAppointment &&
!activeEditingAppointment.hasTreatment
}
onDelete={() => void handleDeleteEditingAppointment()}
onDelete={() => handleDeleteEditingAppointment()}
deleting={deletingAppointment}
/>
</div>