diff --git a/src/client/src/createtournament.js b/src/client/src/createtournament.js index 1d8b71e..eebbf71 100644 --- a/src/client/src/createtournament.js +++ b/src/client/src/createtournament.js @@ -60,9 +60,12 @@ function submitTournament(event) { }) .then(response => response.json()) .then(data => { - if (data.status == "OK") { + if (data.status === "OK") { alert("Tournament created successfully"); - window.location.href = "/"; + let tournamentId = data.data.tournamentId; + if (tournamentId) { + window.location.href = "/tournament/" + tournamentId; + } } else { showError(data.data) }