diff --git a/components/GameField/GameField.tsx b/components/GameField/GameField.tsx index da623f7..dee59de 100644 --- a/components/GameField/GameField.tsx +++ b/components/GameField/GameField.tsx @@ -33,11 +33,19 @@ export const GameField: React.FC = ({ const [isShowDispute, setShowDispute] = useState(false); const { t } = useTranslation(); const account = useAccount(); - + const { setFinishResult } = useGameStateContext(); const { data, error, loading } = useQuery(badgesQuery, { variables: { id: account.address?.toLowerCase() }, }); - + // TODO added context @habdevs #190 + if (finishGameCheckResult) { + setFinishResult({ + winner: finishGameCheckResult.winner, + isDraw: finishGameCheckResult.isDraw, + cheatWin: finishGameCheckResult.cheatWin, + }); + console.log('CONTEXT GAMEFIELD', setFinishResult) + } console.log('dispute mode', disputeMode, account.address); function isOpponentAddress(address: string): boolean {