Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Last active April 28, 2020 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllGistsEqual/fcfac8117f935f4b51295dff26c7705a to your computer and use it in GitHub Desktop.
Save AllGistsEqual/fcfac8117f935f4b51295dff26c7705a to your computer and use it in GitHub Desktop.
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