Merge branch 'main' of github.com:sullivansean27/tomecraft into main

This commit is contained in:
snen 2021-10-07 03:25:23 -04:00
commit 1c88134753

View File

@ -244,7 +244,12 @@ export default function useServerSocket(
React.useEffect(() => { React.useEffect(() => {
if (state.status !== 'pre-game') return if (state.status !== 'pre-game') return
sendJson({command: 'ready', player_id: state.playerId, match_id: state.matchId}) const intervalId = setInterval(() => {
sendJson({command: 'ready', player_id: state.playerId, match_id: state.matchId})
}, 200)
return () => {
clearInterval(intervalId)
}
}, [sendJson, state]) }, [sendJson, state])
React.useEffect(() => { React.useEffect(() => {