diff --git a/src/components/GameCard.tsx b/src/components/GameCard.tsx index ade5f15..1b34432 100644 --- a/src/components/GameCard.tsx +++ b/src/components/GameCard.tsx @@ -1,5 +1,7 @@ +import { useNavigate } from 'react-router-dom' import '../styles/cardGames.css' import { handleGameImageError } from '../utils' +import { getGamePageRoute } from 'routes' type GameCardProps = { title: string @@ -7,8 +9,13 @@ type GameCardProps = { } export const GameCard = ({ title, imageUrl }: GameCardProps) => { + const navigate = useNavigate() + return ( - +
navigate(getGamePageRoute(title))} + >
{

{title}

-
+
) }