Try a small timeout on initial load
This commit is contained in:
parent
30182ce143
commit
2f8243df85
@ -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)
|
||||
},[])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user