fix: no hover on mobile
continuous-integration/drone/push Build is passing Details

pull/4/head
Antonio De Lucreziis 2 years ago
parent 82c21d2af9
commit d2f143133e

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

Loading…
Cancel
Save