From 91f2a61a7f5376c742da791523814bb4839b01ee Mon Sep 17 00:00:00 2001 From: Victor Chabbert Date: Sun, 22 Jan 2017 13:45:26 +0100 Subject: Refactor user reducer to player reducer --- frontend/src/sagas/gameBrowser.js | 6 +++--- frontend/src/sagas/usernameChoice.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'frontend/src/sagas') 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 => { -- cgit