summaryrefslogtreecommitdiffhomepage
path: root/app/javascript/components/GameCard.jsx
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-05-17 22:16:00 -0400
committerrealtradam <[email protected]>2024-05-17 22:16:00 -0400
commit3321db8f9c549103ebae46bf025a3135208a2e3b (patch)
tree49dd106a76a73ea3e4ec0e826a9b2d690d8c5363 /app/javascript/components/GameCard.jsx
parent98571b599449bfd7497c9b098a07b376da670319 (diff)
downloadgameHolster-3321db8f9c549103ebae46bf025a3135208a2e3b.tar.gz
gameHolster-3321db8f9c549103ebae46bf025a3135208a2e3b.zip
uploading images to games and also iframes for games
Diffstat (limited to 'app/javascript/components/GameCard.jsx')
-rw-r--r--app/javascript/components/GameCard.jsx15
1 files changed, 11 insertions, 4 deletions
diff --git a/app/javascript/components/GameCard.jsx b/app/javascript/components/GameCard.jsx
index 6b79630..9cd815d 100644
--- a/app/javascript/components/GameCard.jsx
+++ b/app/javascript/components/GameCard.jsx
@@ -1,17 +1,24 @@
import React from "react";
//import { Link } from "react-router-dom";
-export default function GameCard ({ link = "./", width = "72" })
+//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 src="https://ggayane.github.io/css-experiments/cards/dark_rider-cover.jpg" className="gameCardCoverImg" />
+ <img src={`/api/v1/games_img/realtradam/${game.titleSlug}.png?type=card`} className="gameCardCoverImg" />
</div>
- <img src="https://ggayane.github.io/css-experiments/cards/dark_rider-title.png" className="gameTitleImg p-5%" />
- <img src="https://ggayane.github.io/css-experiments/cards/dark_rider-character.webp" className="gameCharacterImg" />
+ <img src={`/api/v1/games_img/realtradam/${game.titleSlug}.png?type=title`} className="gameTitleImg p-5%" />
+ <img src={`/api/v1/games_img/realtradam/${game.titleSlug}.png?type=char`} className="gameCharacterImg" />
</div>
</a>
</>