diff options
Diffstat (limited to 'src/components/GameCard.tsx')
| -rw-r--r-- | src/components/GameCard.tsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/components/GameCard.tsx b/src/components/GameCard.tsx new file mode 100644 index 0000000..1f5e766 --- /dev/null +++ b/src/components/GameCard.tsx @@ -0,0 +1,27 @@ +//import React from "react"; +//import { Link } from "react-router-dom"; +import { GameCardProps } from "../types"; + +//game = { +// card_img: "", +// char_img: "", +// title_img: "" +//} + +export default function GameCard ({ link, game }: GameCardProps) +{ + + return ( + <> + <a href={ link } className="block w-min pt-10 px-1" target="_blank"> + <div className="gameCard"> + <div className="gameCardWrapper"> + <img style={{imageRendering: game.img_rendering}} src={`${import.meta.env.VITE_API_TITLE}/api/v1/games_img/realtradam/${game.titleSlug}.png?type=card`} className="gameCardCoverImg" /> + </div> + <img style={{imageRendering: game.img_rendering}} src={`${import.meta.env.VITE_API_TITLE}/api/v1/games_img/realtradam/${game.titleSlug}.png?type=title`} className="gameTitleImg p-5%" /> + <img style={{imageRendering: game.img_rendering}} src={`${import.meta.env.VITE_API_TITLE}/api/v1/games_img/realtradam/${game.titleSlug}.png?type=char`} className="gameCharacterImg" /> + </div> + </a> + </> + ); +} |
