import React from 'react'; import {Accept, Reject, Cancel} from './GameProposalAction'; import './GameProposal.css'; const State = { WaitForOpponent: "GAME_PROPOSAL_WAIT_FOR_OPPONENT", WaitForYou: "GAME_PROPOSAL_WAIT_FOR_YOU", } const GameProposal = ({games}) => { if (games == null) return
Loading..
// for (const [key, value] of Object.entries(games)) // console.log(key, value); const waitForYou = games .filter(game => game.status === State.WaitForYou) .map(game => { return
from {game.opponentName}, opponentColor {game.opponentColor}
{game.message}
to {game.opponentName}, opponentColor ⛀ ⛂{game.opponentColor}
{game.message}