Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanDuvall committed Jun 7, 2024
1 parent 0723ce9 commit 01338b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Lobby/Lobby.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ function Lobby({ players }: Props) {
const cable = createConsumer(
`wss://brain-defrost-f8afea5ead0a.herokuapp.com/cable?player_id=${currentPlayer.id}`
);
//@ts-ignore
const link = cable.subscriptions.create(
{ channel: "GameChannel", game_id: gameid },
{
received: (data) => {
console.log(data);
if (data.game_started === true) {
navigate(`/game/play/${gameid}`, { state: game });
console.log(link)
//link.unsubscribe();
}
setPlayers(data.player_list);
Expand Down

0 comments on commit 01338b3

Please sign in to comment.