---
export const prerender = false;
import Layout from "../../layouts/Layout.astro";
import games from "../../json/games.json";
const gamesList = games as GameList;
// get the current game based on the information in the url
const game = Astro.params.game;
if (!game) {
Astro.redirect("/en/games/");
return;
}
function isValidGameKey(key: string) {
return key in gamesList;
}
const gameData = isValidGameKey(game) ? gamesList[game] : null;
if (!gameData) {
return Astro.redirect("/en/games/");
}
---
{
gameData.unity ? (
) : gameData.flash ? (
) : (
)
}
{gameData.name}