import React from "react"; import "./css/lobby.css" import Colors from "./util/colors"; import deck from './img/deck.svg'; import { Commands } from "./StateRouter"; export default function Lobby({ message, pickColor, deal }) { const { color, options, state, game_code, others, name,...args } = message; const circle_args = { state, myColor: color, myName: name, others, pickColor }; const canDeal = options.find((o) => o.code === Commands.DEAL); return
} function Circle({ color, myColor, myName, others, pickColor }) { const isMine = color === myColor; const playerInfo = isMine ? {color, name: myName} : others.find((o) => o.color === color); const isSelectable = !(playerInfo ?? false); const isPicked = !isSelectable; const name = (playerInfo && playerInfo.name) || ""; return