Last active
April 28, 2020 16:48
-
-
Save AllGistsEqual/fcfac8117f935f4b51295dff26c7705a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useCallback } from 'react' | |
import { Image, View, Text } from 'react-native' | |
import PropTypes from 'prop-types' | |
import { useFocusEffect } from '@react-navigation/native' | |
import TouchableWrapper from '../../components/global/layout/TouchableWrapper' | |
import DefaultPage from '../../components/DefaultPage' | |
import AbeLogo from '../../../assets/AllBitsEqual_logo_light.png' | |
const SceneSplash = ({ navigation }) => { | |
useFocusEffect( | |
useCallback(() => { | |
const delayedNavigation = setTimeout(() => { | |
navigation.navigate('Login') | |
}, 2000) | |
return () => clearTimeout(delayedNavigation) | |
}, []) | |
) | |
return ( | |
<TouchableWrapper handlePress={() => navigation.navigate('Login')}> | |
<DefaultPage> | |
<Image | |
style={{ width: 150, height: 120 }} | |
source={AbeLogo} | |
/> | |
<View> | |
<Text style={{ fontSize: 23, marginTop: 80 }}> | |
by Konrad Abe | |
</Text> | |
</View> | |
</DefaultPage> | |
</TouchableWrapper> | |
) | |
} | |
SceneSplash.propTypes = { | |
navigation: PropTypes.object.isRequired, | |
} | |
export default SceneSplash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment