@@ -234,9 +234,9 @@ async function renderNewTournament(tournamentData) {
234234 <button class="btn ${ isCreator ? "btn-outline-success" : "btn-outline-secondary" } " id="start-button" data-tournament-id="${ tournament . id } " disabled>
235235 start
236236 </button>
237- <button class="btn btn-outline-secondary" id="tournamentStatsButton" data-tournament-id="${ tournament . id } " >
237+ <!-- button class="btn btn-outline-secondary" id="tournamentStatsButton" data-tournament-id="${ tournament . id } " >
238238 get_brackets
239- </button>
239+ </button-- >
240240 <button class="btn btn-outline-danger" id="tournamentDelete" data-tournament-id="${ tournament . id } " ${ isCreator ? "" : "disabled" } >
241241 delete
242242 </button>
@@ -283,21 +283,21 @@ async function renderNewTournament(tournamentData) {
283283 const tournamentStatsButton = tournamentDiv . querySelector (
284284 "#tournamentStatsButton"
285285 ) ;
286- tournamentStatsButton . addEventListener ( "click" , async ( ) => {
287- // if (socket && socket.readyState === WebSocket.OPEN) {
288- socket . send (
289- JSON . stringify ( {
290- type : "get_brackets" ,
291- message : "suca2" ,
292- } )
293- ) ;
294- console . log ( "Messaggio 'get_brackets' inviato via WebSocket" ) ;
295- // } else {
296- // showAlertForXSeconds("Connessione WebSocket non attiva!", "error", 3, {
297- // asToast: true,
298- // });
299- // }
300- } ) ;
286+ // tournamentStatsButton.addEventListener("click", async () => {
287+ // // if (socket && socket.readyState === WebSocket.OPEN) {
288+ // socket.send(
289+ // JSON.stringify({
290+ // type: "get_brackets",
291+ // message: "suca2",
292+ // })
293+ // );
294+ // console.log("Messaggio 'get_brackets' inviato via WebSocket");
295+ // // } else {
296+ // // showAlertForXSeconds("Connessione WebSocket non attiva!", "error", 3, {
297+ // // asToast: true,
298+ // // });
299+ // // }
300+ // });
301301
302302 const tournamentDeleteButton =
303303 tournamentDiv . querySelector ( "#tournamentDelete" ) ;
@@ -307,21 +307,21 @@ async function renderNewTournament(tournamentData) {
307307 } ) ;
308308}
309309
310- window . sendGetBrackets = function ( ) {
311- if ( socket && socket . readyState === WebSocket . OPEN ) {
312- socket . send (
313- JSON . stringify ( {
314- type : "get_brackets" ,
315- message : "suca2" ,
316- } )
317- ) ;
318- console . log ( "Messaggio 'get_brackets' inviato via WebSocket" ) ;
319- } else {
320- showAlertForXSeconds ( "Connessione WebSocket non attiva!" , "error" , 3 , {
321- asToast : true ,
322- } ) ;
323- }
324- } ;
310+ // window.sendGetBrackets = function () {
311+ // if (socket && socket.readyState === WebSocket.OPEN) {
312+ // socket.send(
313+ // JSON.stringify({
314+ // type: "get_brackets",
315+ // message: "suca2",
316+ // })
317+ // );
318+ // console.log("Messaggio 'get_brackets' inviato via WebSocket");
319+ // } else {
320+ // showAlertForXSeconds("Connessione WebSocket non attiva!", "error", 3, {
321+ // asToast: true,
322+ // });
323+ // }
324+ // };
325325
326326function deleteTournamentDiv ( tournamentId ) {
327327 const tournamentDiv = document . getElementById ( `tournament-${ tournamentId } ` ) ;
0 commit comments