diff options
| author | realtradam <[email protected]> | 2024-05-17 22:16:00 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2024-05-17 22:16:00 -0400 |
| commit | 3321db8f9c549103ebae46bf025a3135208a2e3b (patch) | |
| tree | 49dd106a76a73ea3e4ec0e826a9b2d690d8c5363 /app/javascript/components/Game.jsx | |
| parent | 98571b599449bfd7497c9b098a07b376da670319 (diff) | |
| download | gameHolster-3321db8f9c549103ebae46bf025a3135208a2e3b.tar.gz gameHolster-3321db8f9c549103ebae46bf025a3135208a2e3b.zip | |
uploading images to games and also iframes for games
Diffstat (limited to 'app/javascript/components/Game.jsx')
| -rw-r--r-- | app/javascript/components/Game.jsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/javascript/components/Game.jsx b/app/javascript/components/Game.jsx new file mode 100644 index 0000000..8b80b8e --- /dev/null +++ b/app/javascript/components/Game.jsx @@ -0,0 +1,23 @@ +import React, { useState, useEffect } from "react"; +import { useParams } from "react-router-dom"; +//import { Link } from "react-router-dom"; +import GameCard from "./GameCard"; +import Button from "./Button"; + +//<Route path="/games/:user/:game" element={<Game />} /> + +//export default () => ( +export default function Games () { + let { user, game } = useParams(); +//http://localhost:3000/api/v1/game/realtradam/orc-arena-of-time/index.html + return( + <> + <div> + <div className="flex flex-col gap-16 max-w-6xl shrink"> + <div className="title font-bold text-6xl font-title">Orc: Arena of Time</div> + <iframe style={{ aspectRatio: 1 }} className="bg-black aspect-square max-h-[90vh] rounded" src="http://localhost:3000/api/v1/game/realtradam/orc-arena-of-time/index.html" title={game}></iframe> + </div> + </div> + </> + ); +}; |
