Compare commits
3 Commits
a3146f055f
...
1c88134753
Author | SHA1 | Date | |
---|---|---|---|
|
1c88134753 | ||
|
8a47729bcc | ||
fcd8868849 |
@ -90,7 +90,7 @@ export default function Game(props: GameProps): JSX.Element {
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{maybeIsGameWinner ? "You Lose!" : "You Win!"}
|
||||
{maybeIsGameWinner ? "You Win!" : "You Lose!"}
|
||||
</div>
|
||||
)}
|
||||
<div className="player-info">
|
||||
|
@ -244,7 +244,12 @@ export default function useServerSocket(
|
||||
|
||||
React.useEffect(() => {
|
||||
if (state.status !== 'pre-game') return
|
||||
const intervalId = setInterval(() => {
|
||||
sendJson({command: 'ready', player_id: state.playerId, match_id: state.matchId})
|
||||
}, 200)
|
||||
return () => {
|
||||
clearInterval(intervalId)
|
||||
}
|
||||
}, [sendJson, state])
|
||||
|
||||
React.useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user