From 27990fcba5a47252df617db1bc98e2276b326e7e Mon Sep 17 00:00:00 2001 From: jbion Date: Fri, 22 Feb 2019 23:09:40 +0100 Subject: Implement Game start --- frontend/src/sagas/gameBrowser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'frontend/src/sagas/gameBrowser.js') 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); -- cgit