Skip to content

Commit

Permalink
Remove existing lecture in calendar on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavilien committed Dec 1, 2024
1 parent e46b92b commit 9b18bd6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/frontend/src/components/ScheduleCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ const getEvents = (CourseDetails: Course[], selectedSemester: string, selectedSe
const hoverSection = selectedCourse?.schedules?.find(sched => sessionToString(sched) === selectedSemester)
?.sections.find(section => section.name === hoverSession["Section"]);

events = events.filter(event => event.title.slice(0, courseID.length) !== courseID);

const hoverColor = getCalendarColorLight(`${selectedSessions[courseID]?.Color}`) || "";
if (hoverLecture)
events.push(...getTimes(courseID, hoverLecture.name || "Lecture", hoverLecture.times, hoverColor));
Expand Down

0 comments on commit 9b18bd6

Please sign in to comment.