myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

commit f130976454e11cc703e37f3a0951e66145cd8c5c
parent b16427c95e8c255d9dee598d60effbd87997a11f
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Tue,  4 Apr 2023 23:37:06 +0200

fix: loop in heat list

Diffstat:
Msrc/Heats.js | 3++-
Msrc/Leaderboard.js | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Heats.js b/src/Heats.js @@ -11,6 +11,7 @@ async function deleteHeat(e, heatId, heatName) { .from('heats') .delete() .eq('id', heatId) + window.location.reload() } } @@ -23,7 +24,7 @@ function HeatForm({session}) { if (heatList.error === null) setHeats(heatList.data) })(); - }, [heats]) + }, []) return ( <div> diff --git a/src/Leaderboard.js b/src/Leaderboard.js @@ -130,7 +130,7 @@ async function newHeatFromLeaderboard(e, leaderboard, rankingComp, selectHeatRef alert('Created new heat "' + newHeatName + '" with top ' + newHeatSize + ' athletes') // todo: put heatOpts and rankOptions in state/useEffect again - window.location.reload(); + window.location.reload() } function Leaderboard() {