Skip to content

Commit

Permalink
Revert erroneous merge resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhxNguyen7 committed Jan 31, 2024
1 parent 7e6d72d commit dc03758
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions apps/antalmanac/src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,15 @@ export default function CourseMap() {
}, []);

useEffect(() => {
const updateCustomEventMarkers = () => {
setCustomEventMarkers(getCustomEventPerBuilding());
const updateCalendarEvents = () => {
setCalendarEvents(AppStore.getCourseEventsInCalendar());
};

AppStore.on('customEventsChange', updateCustomEventMarkers);
AppStore.on('currentScheduleIndexChange', updateCustomEventMarkers);
AppStore.on('addedCoursesChange', updateCalendarEvents);
AppStore.on('currentScheduleIndexChange', updateCalendarEvents);

return () => {
AppStore.removeListener('customEventsChange', updateCustomEventMarkers);
AppStore.removeListener('currentScheduleIndexChange', updateCustomEventMarkers);
AppStore.removeListener('addedCoursesChange', updateCalendarEvents);
};
}, []);

Expand Down

0 comments on commit dc03758

Please sign in to comment.