myheats

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

commit 985454bbb31848c174faf822af9dabf76884d9ca
parent e5359dbd43e3d0b3e37ae07299ec466394b4aed6
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun, 15 Mar 2026 20:54:43 +0100

feat: improve setLoading on socket msg from db

Diffstat:
Msrc/frontend/Leaderboard.jsx | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/frontend/Leaderboard.jsx b/src/frontend/Leaderboard.jsx @@ -354,11 +354,13 @@ function Leaderboard({session}) { useEffect(() => { (async() => { socket.onmessage = async function(event) { + setLoading(true) + // todo: reload only required scores const scoreSummary = await getScoreSummary(heatSelection.map(h => h.value), session) setLeaderboard(scoreSummary) + setLoading(false) } - setLoading(false) })(); }, [heatSelection]);