summaryrefslogtreecommitdiffhomepage
path: root/src/components/GameCard.jsx
blob: ac631600c8c7c6d5ec39a40ed42c2d85239bdc9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from "react";
//import { Link } from "react-router-dom";

//game = {
//	card_img: "",
//	char_img: "",
//	title_img: ""
//}

export default function GameCard ({ link = "./", width = "72", game = { card_img: "https://ggayane.github.io/css-experiments/cards/dark_rider-cover.jpg", char_img: "https://ggayane.github.io/css-experiments/cards/dark_rider-character.png", title_img: "https://ggayane.github.io/css-experiments/cards/dark_rider-title.png" } }) 
{
	
	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>
		</>
	)
};