Ignore class attendance buttons if no change

This commit is contained in:
Tanner Collin 2020-09-17 22:15:48 +00:00
parent b45f86e0cc
commit 6603eb56ac

View File

@ -72,6 +72,7 @@ function AttendanceRow(props) {
const handleMark = (newStatus) => {
if (loading) return;
if (student.attendance_status == newStatus) return;
setLoading(newStatus);
const data = { ...student, attendance_status: newStatus };
requester('/training/'+student.id+'/', 'PATCH', token, data)