diff options
Diffstat (limited to 'frontend/src/redux/games.js')
-rw-r--r-- | frontend/src/redux/games.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/frontend/src/redux/games.js b/frontend/src/redux/games.js index a7115dcc..9ef0e7cd 100644 --- a/frontend/src/redux/games.js +++ b/frontend/src/redux/games.js @@ -1,12 +1,12 @@ -import Immutable from "seamless-immutable"; +import Immutable from 'seamless-immutable'; export const types = { - UPDATE_GAMES: "GAME/UPDATE_GAMES", - REQUEST_CREATE_GAME: "GAME/REQUEST_CREATE_GAME", - REQUEST_JOIN_GAME: "GAME/REQUEST_JOIN_GAME", - REQUEST_START_GAME: "GAME/REQUEST_JOIN_GAME", - ENTER_LOBBY: "GAME/ENTER_LOBBY", - ENTER_GAME: "GAME/ENTER_GAME" + UPDATE_GAMES: 'GAME/UPDATE_GAMES', + REQUEST_CREATE_GAME: 'GAME/REQUEST_CREATE_GAME', + REQUEST_JOIN_GAME: 'GAME/REQUEST_JOIN_GAME', + REQUEST_START_GAME: 'GAME/REQUEST_JOIN_GAME', + ENTER_LOBBY: 'GAME/ENTER_LOBBY', + ENTER_GAME: 'GAME/ENTER_GAME', }; export const actions = { @@ -14,16 +14,16 @@ export const actions = { requestJoinGame: gameId => ({ type: types.REQUEST_JOIN_GAME, gameId }), requestCreateGame: gameName => ({ type: types.REQUEST_CREATE_GAME, - gameName + gameName, }), requestStartGame: () => ({ type: types.REQUEST_START_GAME }), enterLobby: lobby => ({ type: types.ENTER_LOBBY, lobby: Immutable(lobby) }), - enterGame: () => ({ type: types.ENTER_GAME }) + enterGame: () => ({ type: types.ENTER_GAME }), }; const initialState = Immutable.from({ all: {}, - current: "" + current: '', }); export default (state = initialState, action) => { @@ -31,7 +31,7 @@ export default (state = initialState, action) => { case types.UPDATE_GAMES: return Immutable.merge(state, { all: action.games }, { deep: true }); case types.ENTER_LOBBY: - return state.set("current", action.lobby.id); + return state.set('current', action.lobby.id); default: return state; } |