diff --git a/src/components/media/MediaCard.tsx b/src/components/media/MediaCard.tsx index 17ada085..9c7a55c3 100644 --- a/src/components/media/MediaCard.tsx +++ b/src/components/media/MediaCard.tsx @@ -66,7 +66,7 @@ function MediaCardContent({ return (
closable && onClose?.()} icon={Icons.X} /> diff --git a/src/pages/Discover.tsx b/src/pages/Discover.tsx index 93a64ad2..fe57cc17 100644 --- a/src/pages/Discover.tsx +++ b/src/pages/Discover.tsx @@ -5,6 +5,7 @@ import { useNavigate } from "react-router-dom"; import { ThinContainer } from "@/components/layout/ThinContainer"; import { WideContainer } from "@/components/layout/WideContainer"; import { Divider } from "@/components/utils/Divider"; +import { Flare } from "@/components/utils/Flare"; import { HomeLayout } from "@/pages/layouts/HomeLayout"; import { conf } from "@/setup/config"; import { useThemeStore } from "@/stores/theme"; @@ -270,30 +271,51 @@ export function Discover() { onWheel={(e) => handleWheel(e, categorySlug)} > {medias.slice(0, 20).map((media) => ( - + { + if (e.key === "Enter") { navigate( `/media/tmdb-${isTVShow ? "tv" : "movie"}-${media.id}-${ isTVShow ? media.name : media.title }`, - ) - // Navigate instead of href! - } - rel="noopener noreferrer" - className="block rounded-xl text-center relative overflow-hidden transition-transform transform hover:scale-95 duration-500 mr-5" - style={{ flex: `0 0 ${movieWidth}` }} // Set a fixed width for each movie + ); + } + }} > - {isTVShow - + + + navigate( + `/media/tmdb-${isTVShow ? "tv" : "movie"}-${media.id}-${ + isTVShow ? media.name : media.title + }`, + ) + } + rel="noopener noreferrer" + className="block rounded-xl text-center relative overflow-hidden transition-transform transform hover:scale-95 duration-500 mr-5" + style={{ flex: `0 0 ${movieWidth}` }} // Set a fixed width for each movie + > + {isTVShow + + + ))}
+