diff --git a/webapp/src/container/Games.jsx b/webapp/src/container/Games.jsx index 31d3584..43da121 100644 --- a/webapp/src/container/Games.jsx +++ b/webapp/src/container/Games.jsx @@ -1,5 +1,5 @@ -import './Games.css'; import React from 'react'; +import { GamesContext } from '../context/games'; import { NavLink, Routes, Route } from 'react-router-dom'; import NewGame from './games/view/NewGame'; @@ -17,16 +17,16 @@ import Forward from './games/action/Forward'; import GameBoard from './games/GameBoard'; -import { GamesContext } from '../context/games'; +import './Games.css'; -export default function Games({ context, players }) { +export default function Games({ context: { games, dispatchGames, gamesApi }, players }) { return ( - +
- +
diff --git a/webapp/src/container/games/view/NewGame.jsx b/webapp/src/container/games/view/NewGame.jsx index 0069967..0ce7d3e 100644 --- a/webapp/src/container/games/view/NewGame.jsx +++ b/webapp/src/container/games/view/NewGame.jsx @@ -35,7 +35,6 @@ export default function NewGame({ players, onSelectPlayer }) { whitePlayer = ''; } - console.log("WhitePlayer", whitePlayer, "BlackPlayer", blackPlayer); onSelectPlayer(whitePlayer, blackPlayer); } diff --git a/webapp/src/context/games.jsx b/webapp/src/context/games.js similarity index 100% rename from webapp/src/context/games.jsx rename to webapp/src/context/games.js diff --git a/webapp/src/reducer/games.js b/webapp/src/reducer/games.js index 40c4954..854ef37 100644 --- a/webapp/src/reducer/games.js +++ b/webapp/src/reducer/games.js @@ -13,7 +13,7 @@ export const gamesInitialState = { export function gamesReducer(state, action) { switch (action.type) { - case 'next': + case 'next': return nextState(state, action); default: