diff --git a/index.html b/index.html index ec81967..53bf0e1 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ - + diff --git a/src/components/CourseVisibility.jsx b/src/components/CourseVisibility.jsx index a64ec18..cd5258e 100644 --- a/src/components/CourseVisibility.jsx +++ b/src/components/CourseVisibility.jsx @@ -1,11 +1,11 @@ import { Icon } from './Icon.jsx' -export const ToolOverlay = ({ visibility, toggleVisibility }) => ( +export const ToolOverlay = ({ visibility, toggleVisibility, onClose }) => (
diff --git a/src/components/EventsView.jsx b/src/components/EventsView.jsx index f836eb4..3ba109c 100644 --- a/src/components/EventsView.jsx +++ b/src/components/EventsView.jsx @@ -127,8 +127,6 @@ const WorkWeekView = ({ events }) => { const WorkWeekVerticalView = ({ events, selection, setSelection, hideOtherCourses }) => { const selectionSet = new Set(selection) - console.log(hideOtherCourses) - const eventsByWeekday = _.groupBy( !hideOtherCourses ? events : events.filter(e => selectionSet.has(e.name)), event => event.start.getDay() @@ -273,10 +271,14 @@ const WorkWeekVerticalView = ({ events, selection, setSelection, hideOtherCourse ) } -const CourseView = ({ events, selection, setSelection }) => { - const eventsByCourse = _.groupBy(events, 'name') +const CourseView = ({ events, selection, setSelection, hideOtherCourses }) => { const selectionSet = new Set(selection) + const eventsByCourse = _.groupBy( + !hideOtherCourses ? events : events.filter(e => selectionSet.has(e.name)), + 'name' + ) + const [currentlyHovered, setCurrentlyHovered] = useState(null) const element = useRef() @@ -312,7 +314,7 @@ const CourseView = ({ events, selection, setSelection }) => { data-course-id={name} onClick={() => { if (!selectionSet.has(name)) setSelection([...selection, name]) - else setSelection(selection.filter(name => name !== name)) + else setSelection(selection.filter(n => n !== name)) }} >