diff options
author | Victor Chabbert <chabbertvi@eisti.eu> | 2017-01-22 13:45:26 +0100 |
---|---|---|
committer | Victor Chabbert <chabbertvi@eisti.eu> | 2017-01-22 14:48:37 +0100 |
commit | 91f2a61a7f5376c742da791523814bb4839b01ee (patch) | |
tree | e6cdbac1e062ebadb84a476bdba01cde231c1e36 /frontend/src/sagas | |
parent | Fix node_modules path in travis.yml (diff) | |
download | seven-wonders-91f2a61a7f5376c742da791523814bb4839b01ee.tar.gz seven-wonders-91f2a61a7f5376c742da791523814bb4839b01ee.tar.bz2 seven-wonders-91f2a61a7f5376c742da791523814bb4839b01ee.zip |
Refactor user reducer to player reducer
Diffstat (limited to 'frontend/src/sagas')
-rw-r--r-- | frontend/src/sagas/gameBrowser.js | 6 | ||||
-rw-r--r-- | frontend/src/sagas/usernameChoice.js | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/sagas/gameBrowser.js b/frontend/src/sagas/gameBrowser.js index 19d52df9..5b7227df 100644 --- a/frontend/src/sagas/gameBrowser.js +++ b/frontend/src/sagas/gameBrowser.js @@ -25,7 +25,7 @@ function gameBrowserChannel(socket) { }) } -export function* watchGames({ socket }) { +export function *watchGames({ socket }) { const socketChannel = gameBrowserChannel(socket) try { @@ -50,13 +50,13 @@ export function* watchGames({ socket }) { } } -export function* createGame({ socket }) { +export function *createGame({ socket }) { const { name } = yield take(types.CREATE_GAME) socket.send("/app/lobby/create", JSON.stringify({ gameName: name }), {}) } -export function* gameBrowserSaga(socketConnection) { +export function *gameBrowserSaga(socketConnection) { yield [ call(watchGames, socketConnection), call(createGame, socketConnection) diff --git a/frontend/src/sagas/usernameChoice.js b/frontend/src/sagas/usernameChoice.js index d0d0cdea..e9812c72 100644 --- a/frontend/src/sagas/usernameChoice.js +++ b/frontend/src/sagas/usernameChoice.js @@ -2,7 +2,7 @@ import { call, take, put } from 'redux-saga/effects' import { eventChannel } from 'redux-saga' import { push } from 'react-router-redux' -import { actions, types } from '../redux/user' +import { actions, types } from '../redux/players' function usernameValidationChannel(socket) { return eventChannel(emitter => { |