From 79ec9f4eff72b6f8544814ebfa87beaa67b6a878 Mon Sep 17 00:00:00 2001 From: dylan <> Date: Sun, 31 Mar 2024 19:52:06 -0700 Subject: [PATCH] More slight fixes --- src/client/GamePage.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 => (