From b494d2d141a942b0905ac46a551ff42878f0f081 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Thu, 11 May 2017 19:47:49 +0200 Subject: First attempt at lobby joining --- frontend/src/sagas/usernameChoice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend/src/sagas/usernameChoice.js') diff --git a/frontend/src/sagas/usernameChoice.js b/frontend/src/sagas/usernameChoice.js index da720e9f..ad5b5341 100644 --- a/frontend/src/sagas/usernameChoice.js +++ b/frontend/src/sagas/usernameChoice.js @@ -17,13 +17,13 @@ function usernameValidationChannel(socket) { function *usernameValidation({ socket }) { const usernameChannel = yield call(usernameValidationChannel, socket) const user = yield take(usernameChannel) - yield put(actions.setUsername(user.get('username'), user.get('displayName'), user.get('index'))) + yield put(actions.setCurrentPlayer(user)) usernameChannel.close() yield put(push('/games')) } function *sendUsername({ socket }) { - const { username } = yield take(types.CHOOSE_USERNAME) + const { username } = yield take(types.REQUEST_CHOOSE_USERNAME) yield socket.send('/app/chooseName', JSON.stringify({ playerName: username -- cgit