diff --git a/src/pages/Discover.tsx b/src/pages/Discover.tsx index 24653446..1921538e 100644 --- a/src/pages/Discover.tsx +++ b/src/pages/Discover.tsx @@ -211,7 +211,6 @@ export function Discover() { }, [movieWidth]); let isScrolling = false; - function handleWheel(e: React.WheelEvent, categorySlug: string) { if (isScrolling) { return; @@ -262,12 +261,7 @@ export function Discover() { ? `${category} Shows` : `${category} Movies`; return ( -
handleWheel(e, categorySlug)} - > +

{displayCategory}

@@ -281,6 +275,9 @@ export function Discover() { ref={(el) => { carouselRefs.current[categorySlug] = el; }} + onMouseEnter={handleMouseEnter} + onMouseLeave={handleMouseLeave} + onWheel={(e) => handleWheel(e, categorySlug)} > {medias.slice(0, 20).map((media) => (