Try a small timeout on initial load

This commit is contained in:
AMay 2026-10-24 02:59:49 -05:00
parent 30182ce143
commit 2f8243df85

View File

@ -15,13 +15,13 @@ export function Bracket({userRole}:{userRole:Number}){
})
fetch("/api/getAllScores").then((resp)=>resp.json())
.then((result)=>{
setTimeout(()=>{setMatchResults(result.matches)},1000)
setMatchResults(result.matches)
})
}
useEffect(()=>{
const interval=setInterval(updatePlayers,20000)
updatePlayers()
setTimeout(()=>{updatePlayers()},300)
return ()=>clearInterval(interval)
},[])