1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Add debugging for channels

This commit is contained in:
Daniel Barber 2018-02-26 22:59:55 -05:00
parent 538758d97f
commit 59f16d7413
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -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 {
<tfoot>
<tr className="board-border-bottom">
<th className="board-border-left"></th>
<th colspan="8"></th>
<th colSpan="8"></th>
<th className="board-border-left"></th>
</tr>
</tfoot>