diff --git a/assets/js/components/chess-board.js b/assets/js/components/chess-board.js index ba0cde6..ebe9158 100644 --- a/assets/js/components/chess-board.js +++ b/assets/js/components/chess-board.js @@ -23,7 +23,9 @@ class ChessBoard extends React.Component { }); this.channel = socket.channel("game:" + gameId, {}); - this.channel.join(); + this.channel.join() + .receive("ok", resp => { console.log("Joined successfully", resp) }) + .receive("error", resp => { console.log("Unable to join", resp) }); this.channel.on("game_update", data => { store.dispatch(setGame(data)); @@ -131,7 +133,7 @@ class ChessBoard extends React.Component { - +