try fixing overflow issue on mobile when users scroll the carosel

This commit is contained in:
sussy-code 2024-04-29 19:56:50 +00:00
parent 17d055ce4f
commit d370a9ea7c
1 changed files with 7 additions and 0 deletions

View File

@ -235,6 +235,13 @@ export function Discover() {
setIsHovered(false); setIsHovered(false);
}; };
useEffect(() => {
window.addEventListener("mouseleave", handleMouseLeave);
return () => {
window.removeEventListener("mouseleave", handleMouseLeave);
};
}, []);
function renderMovies(medias: Media[], category: string, isTVShow = false) { function renderMovies(medias: Media[], category: string, isTVShow = false) {
const categorySlug = `${category.toLowerCase().replace(/ /g, "-")}${Math.random()}`; // Convert the category to a slug const categorySlug = `${category.toLowerCase().replace(/ /g, "-")}${Math.random()}`; // Convert the category to a slug
const displayCategory = const displayCategory =