diff options
author | Victor Chabbert <chabbertvi@eisti.eu> | 2017-01-22 12:46:01 +0100 |
---|---|---|
committer | Victor Chabbert <chabbertvi@eisti.eu> | 2017-01-22 12:46:01 +0100 |
commit | 3f2c73cccc554c87bfe39ab706bf01690fb28baf (patch) | |
tree | 2e20d1de318acbda019242a6336495c526ce110f /frontend/src/redux | |
parent | Ans /user/queue/lobby/joined message on game creation (diff) | |
download | seven-wonders-3f2c73cccc554c87bfe39ab706bf01690fb28baf.tar.gz seven-wonders-3f2c73cccc554c87bfe39ab706bf01690fb28baf.tar.bz2 seven-wonders-3f2c73cccc554c87bfe39ab706bf01690fb28baf.zip |
Handle game browser
Diffstat (limited to 'frontend/src/redux')
-rw-r--r-- | frontend/src/redux/game.js | 4 | ||||
-rw-r--r-- | frontend/src/redux/user.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/redux/game.js b/frontend/src/redux/game.js index 64373958..a19e155e 100644 --- a/frontend/src/redux/game.js +++ b/frontend/src/redux/game.js @@ -1,14 +1,14 @@ import { Map } from 'immutable' export const types = { - NEW_GAME: 'GAME/NEW_GAME', + CREATE_OR_UPDATE_GAMES: 'GAME/CREATE_OR_UPDATE_GAMES', ENTER_GAME: 'GAME/ENTER_GAME', JOIN_GAME: 'GAME/JOIN_GAME', CREATE_GAME: 'GAME/CREATE_GAME', } export const actions = { - newGame: (game) => ({ type: types.NEW_GAME, game }), + createOrUpdateGame: (game) => ({ type: types.CREATE_OR_UPDATE_GAMES, game }), enterGame: (username) => ({ type: types.ENTER_GAME, username }), joinGame: (id) => ({ type: types.JOIN_GAME, id }), createGame: (name) => ({ type: types.CREATE_GAME, name }), diff --git a/frontend/src/redux/user.js b/frontend/src/redux/user.js index 5926ed59..9046cc97 100644 --- a/frontend/src/redux/user.js +++ b/frontend/src/redux/user.js @@ -27,7 +27,7 @@ export default (state = initialState, action) => { case types.SET_USERNAME: return state.set('username', action.username) .set('displayName', action.displayName) - .set('id', action.index) + .set('index', action.index) default: return state } |