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