diff --git a/frontend/static/js/api/tournament/Tournament.js b/frontend/static/js/api/tournament/Tournament.js index 634ee11..c355fc0 100644 --- a/frontend/static/js/api/tournament/Tournament.js +++ b/frontend/static/js/api/tournament/Tournament.js @@ -72,7 +72,8 @@ class Tourmanent extends AExchangeable return; this.connected = false; this._socket.close(); - this.disconnectHandler(event); + if (this.disconnectHandler != null) + this.disconnectHandler(event); } /** diff --git a/frontend/static/js/views/tournament/TournamentsListView.js b/frontend/static/js/views/tournament/TournamentsListView.js index bc6b553..b0a2459 100644 --- a/frontend/static/js/views/tournament/TournamentsListView.js +++ b/frontend/static/js/views/tournament/TournamentsListView.js @@ -1,4 +1,4 @@ -import {client} from "../../index.js"; +import {client, navigateTo} from "../../index.js"; import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js"; export default class extends AbstractAuthenticatedView @@ -39,6 +39,11 @@ export default class extends AbstractAuthenticatedView // name let td = document.createElement("td"); td.innerText = tournament.name; + td.onclick = async () => { + await navigateTo(String(tournament.id)); + } + td.style.cursor = "pointer"; + td.style.textDecoration = "underline"; tr.appendChild(td); // state