Fix timer shifting when player state is updated

This commit is contained in:
Mitchell McCaffrey 2021-01-01 14:57:56 +11:00
parent 63129dfa14
commit a146495326

View File

@ -64,7 +64,7 @@ function Party({ gameId, stream, partyStreams, onStreamStart, onStreamEnd }) {
return () => {
cancelAnimationFrame(request);
};
}, [playerState, setPlayerState]);
}, [playerState.timer, setPlayerState]);
function handleNicknameChange(newNickname) {
setPlayerState((prevState) => ({ ...prevState, nickname: newNickname }));