From f1fc76b7bd42412f10b01a7dace6539f625cae23 Mon Sep 17 00:00:00 2001 From: Malaber Date: Thu, 13 Mar 2025 13:33:39 +0100 Subject: [PATCH] Revert "Fix timer not showing" This reverts commit 2243d3e7dd61b1415b860e656fb2b481a969a8ea. --- pages/tournament-fullscreen.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/tournament-fullscreen.js b/pages/tournament-fullscreen.js index 418c1d8..9144772 100644 --- a/pages/tournament-fullscreen.js +++ b/pages/tournament-fullscreen.js @@ -141,7 +141,12 @@ class Main extends React.Component { updateTimerEnd() { const tournamentId = this.props.query.code; getTournamentTimerEnd(tournamentId, (status, timerEnd) => { - this.setState({timerEnd: timerEnd}); + const now = new Date(); + if (timerEnd > now) { + this.setState({timerEnd: timerEnd}); + } else { + this.setState({timerEnd: null}); + } }, error => { console.error('Failed to fetch timer end:', error); });