|
|
@ -21,8 +21,10 @@ export const Course = ({ events, selection, setSelection, hideOtherCourses }) =>
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
if (element.current) {
|
|
|
|
if (element.current) {
|
|
|
|
const l = e => {
|
|
|
|
const l = e => {
|
|
|
|
|
|
|
|
const isMobile = window.matchMedia('(pointer: coarse)').matches
|
|
|
|
|
|
|
|
|
|
|
|
const $course = e.target.closest('.course')
|
|
|
|
const $course = e.target.closest('.course')
|
|
|
|
if ($course) {
|
|
|
|
if ($course && !isMobile) {
|
|
|
|
setCurrentlyHovered($course.dataset.courseId)
|
|
|
|
setCurrentlyHovered($course.dataset.courseId)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
setCurrentlyHovered(null)
|
|
|
|
setCurrentlyHovered(null)
|
|
|
|