quit game and clear interval
This commit is contained in:
@@ -11,8 +11,14 @@ const GameContainer = require('./game.container');
|
||||
|
||||
const addState = connect(
|
||||
function receiveState(state) {
|
||||
const {game} = state;
|
||||
return {game};
|
||||
const { game, ws } = state;
|
||||
|
||||
if (!game) {
|
||||
console.log('out of game');
|
||||
ws.clearGameStateInterval();
|
||||
}
|
||||
|
||||
return { game };
|
||||
},
|
||||
function receiveDispatch(dispatch) {
|
||||
function setGame(game) {
|
||||
|
||||
Reference in New Issue
Block a user