mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
17 lines
301 B
JavaScript
17 lines
301 B
JavaScript
import socket from "../socket";
|
|
|
|
const Channel = {
|
|
gameChannel: (gameId) => {
|
|
const channel = socket.channel(`game:${gameId}`, {});
|
|
|
|
channel.join()
|
|
.receive("error", resp => {
|
|
console.log("Unable to join", resp);
|
|
});
|
|
|
|
return channel;
|
|
},
|
|
};
|
|
|
|
export default Channel;
|