Skip to content

Commit

Permalink
Don´t forward playoff matches back to main page
Browse files Browse the repository at this point in the history
  • Loading branch information
thordy committed Nov 16, 2024
1 parent 2f2934a commit edb0e76
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ module.exports = {
onMount() {
document.addEventListener("keydown", this.onKeyDown.bind(this), false);

const finishedParam = new URLSearchParams(window.location.search).get('finished');
if (finishedParam) {
// Move back to index page after 2 minutes
setTimeout(() => {
location.href = '/';
}, 120*1000);
// Don´t forward playoff matches
if (this.state.match.tournament && !this.state.match.tournament.is_playoffs) {
const finishedParam = new URLSearchParams(window.location.search).get('finished');
if (finishedParam) {
// Move back to index page after 2 minutes
setTimeout(() => {
location.href = '/';
}, 120*1000);
}
}
},
onKeyDown(e) {
Expand Down

0 comments on commit edb0e76

Please sign in to comment.