import React from 'react'; import { GamesContext } from '../context/games'; import { NavLink, Routes, Route } from 'react-router-dom'; import NewGame from './games/view/NewGame'; import GameSelector from './games/view/GameSelector'; import Create from './games/action/Create'; import Reject from './games/action/Reject'; import Cancel from './games/action/Cancel'; import Accept from './games/action/Accept'; import DrawReq from './games/action/DrawReq'; import DrawAcq from './games/action/DrawAcq'; import Surrender from './games/action/Surrender'; import Backward from './games/action/Backward'; import Forward from './games/action/Forward'; import GameBoard from './games/GameBoard'; import Message2Opponent from './games/Message2Opponent'; import './Games.css'; export default function Games({ context: { gamesReducer, gamesApi }, players }) { const [games, dispatchGames] = gamesReducer; return (
{/* */}
) }; function ViewSelector() { // TODO: counter Wating for YOU return ( ) } function ViewProvider({ gamesReducer, players }) { const [/*games*/, dispatchGames] = gamesReducer; return (
{ dispatchGames({ type: 'nextNewGame', whitePlayer, blackPlayer }) }} players={players} /> } /> console.log("GameProposal", uuid)} /> } /> } /> } />
) } function ActionPanel({ players, gamesApi }) { return (
gamesApi.pushNewGame(reqParams)} /> } /> , , ]} /> , , ]} /> , ]} />
) }