diff --git a/src/components/Tabbar/TabHomeIcon.tsx b/src/components/Tabbar/TabHomeIcon.tsx index a5e41d5..e7b40e5 100644 --- a/src/components/Tabbar/TabHomeIcon.tsx +++ b/src/components/Tabbar/TabHomeIcon.tsx @@ -2,6 +2,8 @@ import React from 'react'; import { View, StyleSheet, Image } from 'react-native'; import { FAB } from 'react-native-paper'; import * as Animatable from 'react-native-animatable'; +import { useNavigation } from '@react-navigation/core'; +import { MainRoutes } from '../../navigation/MainNavigator'; interface Props { icon: string; @@ -74,6 +76,7 @@ const FOCUSED_ICON = require('../../../assets/tab-icon.png'); const UNFOCUSED_ICON = require('../../../assets/tab-icon-outline.png'); function TabHomeIcon(props: Props) { + const navigation = useNavigation(); const getImage = (iconProps: { size: number; color: string }) => { return ( @@ -101,6 +104,7 @@ function TabHomeIcon(props: Props) { > navigation.navigate(MainRoutes.GameStart)} animated={false} icon={getImage} color={'#fff'} diff --git a/src/screens/Game/screens/GameStartScreen.tsx b/src/screens/Game/screens/GameStartScreen.tsx index bcb7480..7ac4e0d 100644 --- a/src/screens/Game/screens/GameStartScreen.tsx +++ b/src/screens/Game/screens/GameStartScreen.tsx @@ -469,7 +469,7 @@ class GameStartScreen extends React.Component { start={{ x: 0, y: 0 }} end={{ x: 0, y: 1 }} > - + {this.getMainContent()}