Skip to content

Commit 1410356

Browse files
committed
Add a Cancel Button on the Edit Timetable Page that takes the user back to the home page
1 parent daca520 commit 1410356

File tree

1 file changed

+6
-2
lines changed
  • course-matrix/frontend/src/pages/TimetableBuilder

1 file changed

+6
-2
lines changed

course-matrix/frontend/src/pages/TimetableBuilder/Calendar.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,22 +373,26 @@ const Calendar = React.memo<CalendarProps>(
373373
</DialogContent>
374374
</Dialog>
375375
) : (
376-
<>
376+
<div className="flex gap-2">
377377
{isChoosingSectionsManually &&
378378
!allOfferingSectionsHaveBeenSelected && (
379379
<p className="text-sm text-red-500 pr-2">
380380
Please select all LEC/TUT/PRA sections for your courses in
381381
order to save your timetable.
382382
</p>
383383
)}
384+
385+
<Button size="sm" variant="outline" onClick={() => navigate("/home")} >
386+
Cancel Editing
387+
</Button>
384388
<Button
385389
size="sm"
386390
disabled={!allOfferingSectionsHaveBeenSelected}
387391
onClick={handleUpdate}
388392
>
389393
Update Timetable
390394
</Button>
391-
</>
395+
</div>
392396
)}
393397
</h1>
394398
<ScheduleXCalendar calendarApp={calendar} />

0 commit comments

Comments
 (0)