diff options
author | jbion <joffrey.bion@amadeus.com> | 2019-02-22 23:09:40 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2019-02-22 23:09:40 +0100 |
commit | 27990fcba5a47252df617db1bc98e2276b326e7e (patch) | |
tree | 7fba886ae83379ee9d76e6540efae7b0e7ce2a25 /frontend/src/sagas/gameBrowser.js | |
parent | Fix websocket value when no message body is received (diff) | |
download | seven-wonders-27990fcba5a47252df617db1bc98e2276b326e7e.tar.gz seven-wonders-27990fcba5a47252df617db1bc98e2276b326e7e.tar.bz2 seven-wonders-27990fcba5a47252df617db1bc98e2276b326e7e.zip |
Implement Game start
Diffstat (limited to 'frontend/src/sagas/gameBrowser.js')
-rw-r--r-- | frontend/src/sagas/gameBrowser.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/sagas/gameBrowser.js b/frontend/src/sagas/gameBrowser.js index 7cd45667..062603a3 100644 --- a/frontend/src/sagas/gameBrowser.js +++ b/frontend/src/sagas/gameBrowser.js @@ -5,8 +5,9 @@ import type { SagaIterator } from 'redux-saga'; import { eventChannel } from 'redux-saga'; import { all, apply, call, put, take } from 'redux-saga/effects'; import type { SevenWondersSession } from '../api/sevenWondersApi'; -import { actions as gameActions, types } from '../redux/games'; -import { actions as playerActions } from '../redux/players'; +import { actions as gameActions } from '../redux/actions/lobby'; +import { types } from '../redux/actions/lobby'; +import { actions as playerActions } from '../redux/actions/players'; import { game as gameSchema, gameList as gameListSchema } from '../schemas/games'; function* watchGames(session: SevenWondersSession): SagaIterator { @@ -32,7 +33,7 @@ function* watchLobbyJoined(session: SevenWondersSession): SagaIterator { const gameId = normalized.result; yield put(playerActions.updatePlayers(normalized.entities.players)); yield put(gameActions.updateGames(normalized.entities.games)); - yield put(gameActions.enterLobby(normalized.entities.games[gameId])); + yield put(gameActions.enterLobby(gameId)); yield put(push(`/lobby/${gameId}`)); } finally { yield apply(joinedLobbyChannel, joinedLobbyChannel.close); |