Move tournament URL

This commit is contained in:
Kalle (Sendou)
2021-11-12 23:52:02 +02:00
parent 00b6fdb4b7
commit 29d53774a1
2 changed files with 2 additions and 2 deletions

View File

@@ -4,9 +4,9 @@ import { useRouter } from "next/dist/client/router";
export function useTournamentData() {
const router = useRouter();
const { tournament } = router.query;
// TODO: as
const [result] = useTournamentByIdentifierQuery({
variables: { identifier: tournament as string },
variables: { identifier: typeof tournament === "string" ? tournament : "" },
pause: typeof tournament !== "string",
});
return result;