diff --git a/src/client/GamePage.tsx b/src/client/GamePage.tsx index 5fe237f..4ffa959 100644 --- a/src/client/GamePage.tsx +++ b/src/client/GamePage.tsx @@ -1,4 +1,4 @@ -import { useParams } from "react-router-dom" +import { useNavigate, useParams } from "react-router-dom" import { Pico8Console } from "./pico8-client/Pico8Console"; import { useEffect, useState } from "react"; import { DbRelease } from "../server/dbal/dbal"; @@ -11,6 +11,7 @@ type Info = { export const GamePage = () => { const {author, slug, version} = useParams(); + const navigate = useNavigate(); const [info, setInfo] = useState(null); useEffect(() => { const fetchInfo = async () => { @@ -51,11 +52,13 @@ export const GamePage = () => { `}>

{info.release.manifest.title ?? slug!.split("-").map(word => word[0].toUpperCase()+word.slice(1)).join(" ")}

-

By: {info.release.author}

+

By {info.release.author}

@@ -63,7 +66,7 @@ export const GamePage = () => { display: flex; justify-content: end; `}> - Version: navigate(`/api/release?author=${author}&slug=${slug}&version=${ev.target.value}`)}> { info.versions.map(v => (