Re-add link to game
This commit is contained in:
parent
7a58ce6b70
commit
aed58f8749
2 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,8 @@ import React from 'react';
|
||||||
import { View, StyleSheet, Image } from 'react-native';
|
import { View, StyleSheet, Image } from 'react-native';
|
||||||
import { FAB } from 'react-native-paper';
|
import { FAB } from 'react-native-paper';
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
|
import { useNavigation } from '@react-navigation/core';
|
||||||
|
import { MainRoutes } from '../../navigation/MainNavigator';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
icon: string;
|
icon: string;
|
||||||
|
@ -74,6 +76,7 @@ const FOCUSED_ICON = require('../../../assets/tab-icon.png');
|
||||||
const UNFOCUSED_ICON = require('../../../assets/tab-icon-outline.png');
|
const UNFOCUSED_ICON = require('../../../assets/tab-icon-outline.png');
|
||||||
|
|
||||||
function TabHomeIcon(props: Props) {
|
function TabHomeIcon(props: Props) {
|
||||||
|
const navigation = useNavigation();
|
||||||
const getImage = (iconProps: { size: number; color: string }) => {
|
const getImage = (iconProps: { size: number; color: string }) => {
|
||||||
return (
|
return (
|
||||||
<Animatable.View useNativeDriver={true} animation={'rubberBand'}>
|
<Animatable.View useNativeDriver={true} animation={'rubberBand'}>
|
||||||
|
@ -101,6 +104,7 @@ function TabHomeIcon(props: Props) {
|
||||||
>
|
>
|
||||||
<FAB
|
<FAB
|
||||||
onPress={props.onPress}
|
onPress={props.onPress}
|
||||||
|
onLongPress={() => navigation.navigate(MainRoutes.GameStart)}
|
||||||
animated={false}
|
animated={false}
|
||||||
icon={getImage}
|
icon={getImage}
|
||||||
color={'#fff'}
|
color={'#fff'}
|
||||||
|
|
|
@ -469,7 +469,7 @@ class GameStartScreen extends React.Component<PropsType> {
|
||||||
start={{ x: 0, y: 0 }}
|
start={{ x: 0, y: 0 }}
|
||||||
end={{ x: 0, y: 1 }}
|
end={{ x: 0, y: 1 }}
|
||||||
>
|
>
|
||||||
<CollapsibleScrollView>
|
<CollapsibleScrollView headerColors={'transparent'}>
|
||||||
{this.getMainContent()}
|
{this.getMainContent()}
|
||||||
<MascotPopup
|
<MascotPopup
|
||||||
prefKey={AsyncStorageManager.PREFERENCES.gameStartMascot.key}
|
prefKey={AsyncStorageManager.PREFERENCES.gameStartMascot.key}
|
||||||
|
|
Loading…
Reference in a new issue