improvement: loading state added to buttons who interact with backend.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -285,7 +285,7 @@ export function AppointmentsPage() {
|
||||
!!activeEditingAppointment &&
|
||||
!activeEditingAppointment.hasTreatment
|
||||
}
|
||||
onDelete={() => void handleDeleteEditingAppointment()}
|
||||
onDelete={() => handleDeleteEditingAppointment()}
|
||||
deleting={deletingAppointment}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user