summaryrefslogtreecommitdiff
path: root/frontend/src/sagas/usernameChoice.js
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2017-05-11 19:47:49 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2017-05-12 00:13:57 +0200
commitb494d2d141a942b0905ac46a551ff42878f0f081 (patch)
tree18d94a3e86d0749f013075a110d6c43efaa782de /frontend/src/sagas/usernameChoice.js
parentAdd time limit setting (diff)
downloadseven-wonders-b494d2d141a942b0905ac46a551ff42878f0f081.tar.gz
seven-wonders-b494d2d141a942b0905ac46a551ff42878f0f081.tar.bz2
seven-wonders-b494d2d141a942b0905ac46a551ff42878f0f081.zip
First attempt at lobby joining
Diffstat (limited to 'frontend/src/sagas/usernameChoice.js')
-rw-r--r--frontend/src/sagas/usernameChoice.js4
1 files changed, 2 insertions, 2 deletions
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
bgstack15