import { format } from 'date-fns' import _ from 'lodash' import { prettyCourseName, WEEK_DAYS, withClasses } from '../../utils.jsx' export const Schedule = ({ timetables, selection, setSelection }) => { const events = timetables['tutti'] const selectionSet = new Set(selection) const visibleEvents = events.filter(e => selectionSet.has(e.id)) const eventsByWeekday = _.mapValues( _.groupBy(visibleEvents, e => e.start.getDay()), dailyEvents => _.groupBy(dailyEvents, e => e.start.getHours()) ) return (