feat: skip the confirmation modal when deleting empty schedules (#716)

Co-authored-by: Derek Chen <derex1987@gmail.com>
This commit is contained in:
zz4zz
2026-02-07 07:18:23 +08:00
committed by GitHub
parent 36e66fd264
commit d5954410a7

View File

@@ -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: (