pass Kifu to appropriate PlayerArea

This commit is contained in:
sorrelbri 2020-06-21 16:02:45 -07:00
parent aed378c021
commit 8414d13949
3 changed files with 9 additions and 1 deletions

View file

@ -2,7 +2,11 @@ import React from "react";
import "./Kifu.scss"; import "./Kifu.scss";
const Kifu = ({ ...props }) => { const Kifu = ({ ...props }) => {
return <></>; return (
<>
<p>Kifu</p>
</>
);
}; };
export default Kifu; export default Kifu;

View file

@ -6,6 +6,7 @@ const PlayerArea = ({
handlePassClick, handlePassClick,
playerMeta, playerMeta,
turn, turn,
Kifu,
}) => { }) => {
const { stones, player, rank, captures } = playerMeta; const { stones, player, rank, captures } = playerMeta;
const isTurn = const isTurn =
@ -32,6 +33,7 @@ const PlayerArea = ({
> >
<p>{bowlText()}</p> <p>{bowlText()}</p>
</div> </div>
{Kifu}
<div <div
className={`player-container__name-space player-container__name-space--${stones}`} className={`player-container__name-space player-container__name-space--${stones}`}
> >

View file

@ -5,6 +5,7 @@ import "./Game.scss";
import Logo from "../../components/Display/Logo/Logo"; import Logo from "../../components/Display/Logo/Logo";
import Board from "../../components/GameUI/Board/Board"; import Board from "../../components/GameUI/Board/Board";
import PlayerArea from "../../components/GameUI/PlayerArea/PlayerArea"; import PlayerArea from "../../components/GameUI/PlayerArea/PlayerArea";
import Kifu from "../../components/GameUI/Kifu/Kifu";
const Game = (props) => { const Game = (props) => {
const { state, dispatch } = props; const { state, dispatch } = props;
@ -139,6 +140,7 @@ const Game = (props) => {
? playerWhiteMeta ? playerWhiteMeta
: playerBlackMeta : playerBlackMeta
} }
Kifu={<Kifu {...props} />}
turn={state?.meta?.turn} turn={state?.meta?.turn}
/> />
</div> </div>