diff --git a/mobile/src/screens/GameScreen.tsx b/mobile/src/screens/GameScreen.tsx index df9f69e..b7acc0b 100644 --- a/mobile/src/screens/GameScreen.tsx +++ b/mobile/src/screens/GameScreen.tsx @@ -1,11 +1,10 @@ import * as React from 'react'; -import { View, Button, Text, useWindowDimensions, Alert } from 'react-native'; +import { View, Text, useWindowDimensions, Alert, Pressable } from 'react-native'; import { useTranslation } from 'react-i18next'; import { GameScreenProps } from '../types'; import { useState } from 'react'; import { Game, GameUsersConnectionInfo } from '../models/Game'; import BoardViewModel from '../viewmodel/BoardViewModel'; -import { Link } from '@react-navigation/native'; import { MancalaGame, Pit } from 'mancala.js'; import { v4 } from 'uuid'; import PitAnimator from '../animation/PitAnimator'; @@ -22,6 +21,7 @@ import LoadingComponent from '../components/LoadingComponent'; import UserStatus from '../components/UserStatus'; import BoardToolbar from '../components/board/BoardToolbar'; import BoardView from '../components/board/BoardView'; +import CircularPanel from '../components/CircularPanel'; export function GameScreen({ navigation, route }: GameScreenProps) { const { context, gameId, userKey } = route.params; @@ -212,23 +212,25 @@ export function GameScreen({ navigation, route }: GameScreenProps) { }, []); const updateHeaderButton = () => { - console.info(game?.mancalaGame.state) + const isGameEnded = game?.mancalaGame.state === "ended" || leftPlayer; navigation.setOptions({ headerRight: () => ( -