diff --git a/apps/antalmanac/src/components/Calendar/CourseCalendarEvent.tsx b/apps/antalmanac/src/components/Calendar/CourseCalendarEvent.tsx index fa0e347d6..a85ce4d51 100644 --- a/apps/antalmanac/src/components/Calendar/CourseCalendarEvent.tsx +++ b/apps/antalmanac/src/components/Calendar/CourseCalendarEvent.tsx @@ -286,20 +286,22 @@ const CourseCalendarEvent = (props: CourseCalendarEventProps) => {
{title}
{building && ( -
- Location:  - - {buildingCatalogue[+building]?.name ?? ''} - -
+ + Location + + + {buildingCatalogue[+building]?.name ?? ''} + + + )} {term && ( - Term:  + Term {term} )} diff --git a/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/CustomEventDialog.tsx b/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/CustomEventDialog.tsx index 9e6be3bff..b73d54348 100644 --- a/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/CustomEventDialog.tsx +++ b/apps/antalmanac/src/components/Calendar/Toolbar/CustomEventDialog/CustomEventDialog.tsx @@ -112,7 +112,10 @@ function CustomEventDialogs(props: CustomEventDialogProps) { const handleAddToCalendar = () => { if (!days.some((day) => day) || scheduleIndices.length === 0) return; - const termsShortNames = AppStore.schedule.getCoursesFromSchedules(scheduleIndices).map((course) => course.term); + const termsInScheduleShortNames = AppStore.schedule + .getCoursesFromSchedules(scheduleIndices) + .map((course) => course.term); + const latestTermInSchedule = getLatestTermByShortName(termsInScheduleShortNames)?.shortName; const newCustomEvent: RepeatingCustomEvent = { color: props.customEvent ? props.customEvent.color : '#551a8b', @@ -122,7 +125,7 @@ function CustomEventDialogs(props: CustomEventDialogProps) { end: end, customEventID: props.customEvent ? props.customEvent.customEventID : Date.now(), building: building, - term: getLatestTermByShortName(termsShortNames)?.shortName, + term: latestTermInSchedule, }; resetForm();