summaryrefslogtreecommitdiff
path: root/frontend/src/containers
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/containers')
-rw-r--r--frontend/src/containers/gameBrowser.js4
-rw-r--r--frontend/src/containers/lobby.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/frontend/src/containers/gameBrowser.js b/frontend/src/containers/gameBrowser.js
index 643dbebc..ac3f1504 100644
--- a/frontend/src/containers/gameBrowser.js
+++ b/frontend/src/containers/gameBrowser.js
@@ -41,8 +41,8 @@ class GameBrowser extends Component {
}
const mapStateToProps = state => ({
- currentPlayer: getCurrentPlayer(state) || { displayName: '[ERROR]' },
- games: getAllGames(state),
+ currentPlayer: getCurrentPlayer(state.get('players')),
+ games: getAllGames(state.get('games')),
});
const mapDispatchToProps = {
diff --git a/frontend/src/containers/lobby.js b/frontend/src/containers/lobby.js
index 90714aec..fc762056 100644
--- a/frontend/src/containers/lobby.js
+++ b/frontend/src/containers/lobby.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
+import { List } from 'immutable';
import { connect } from 'react-redux';
-import Immutable from 'seamless-immutable';
import { Button } from 'rebass';
import PlayerList from '../components/playerList';
@@ -28,10 +28,11 @@ class Lobby extends Component {
}
const mapStateToProps = state => {
- const game = getCurrentGame(state);
+ const game = getCurrentGame(state.get('games'));
+ console.info(game);
return {
currentGame: game,
- players: game ? getPlayers(state, game.players) : Immutable([]),
+ players: game ? getPlayers(state.get('players'), game.players) : new List(),
};
};
bgstack15