summaryrefslogtreecommitdiffhomepage
path: root/src/components/Game.tsx
blob: 51d5b3e16ccef050f1a9dea407aa9d76bc64fe2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//import React, { useState, useEffect } from "react";
import { useParams } from "react-router-dom";

//<Route path="/game/:game" element={<Game />} />

//export default () => (
export default function Games () {
	const { game } = useParams();
//http://%{VITE_API_TITLE}/api/v1/game/realtradam/orc-arena-of-time/index.html
	return(
		<>
			<div className="w-max flex grow shrink justify-center">
				<div className="w-max flex flex-col gap-16 max-w-6xl shrink grow">
					<div className="title font-bold text-6xl font-title">{game}</div>
						<iframe style={{ aspectRatio: 1 }} className="bg-black aspect-square max-h-[90vh] rounded" src={`${import.meta.env.VITE_API_TITLE}/game/realtradam/${game}/index.html`} title={game}></iframe>
				</div>
			</div>
		</>
	);
}