feat: skip the confirmation modal when deleting empty schedules (#716)
Co-authored-by: Derek Chen <derex1987@gmail.com>
This commit is contained in:
@@ -121,6 +121,10 @@ export default function ScheduleListItem({ schedule, onClick }: ScheduleListItem
|
||||
};
|
||||
|
||||
const handleDelete = () => {
|
||||
if (schedule.courses.length <= 0) {
|
||||
deleteSchedule(schedule.id);
|
||||
return;
|
||||
}
|
||||
showDialog({
|
||||
title: 'Delete schedule?',
|
||||
description: (
|
||||
|
||||
Reference in New Issue
Block a user