GT2/Ejectable/screens/HomeScreen.tsx

45 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-08-17 22:00:09 +00:00
import * as React from 'react';
2021-08-21 07:45:27 +00:00
import { StyleSheet, ImageBackground } from 'react-native';
2021-08-17 22:00:09 +00:00
import { Text, View } from '../components/Themed';
import { ScreenInfo3 } from '../components/ScreenInfo';
2021-08-24 15:43:25 +00:00
import { RootTabScreenProps } from '../types';
2021-08-17 22:00:09 +00:00
2021-08-21 07:45:27 +00:00
const image = { uri: "https://meansofproduction.biz/images/GREENT.jpg" };
2021-08-24 00:02:21 +00:00
export var nav:any = null;
2021-08-24 15:43:25 +00:00
export default function HomeScreen( { navigation }: RootTabScreenProps<'Home'>) {
2021-08-24 00:02:21 +00:00
nav = navigation;
2021-08-17 22:00:09 +00:00
return (
<View style={styles.container}>
2021-08-21 07:45:27 +00:00
<ImageBackground source={image} resizeMode="cover" style={styles.image}>
<Text style={styles.title}>GT2</Text>
<View style={styles.separator} />
<ScreenInfo3 />
</ImageBackground>
2021-08-17 22:00:09 +00:00
</View>
);
}
const styles = StyleSheet.create({
2021-08-21 07:45:27 +00:00
image: {
flex: 1,
justifyContent: "center"
},
2021-08-17 22:00:09 +00:00
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
title: {
2021-08-21 07:45:27 +00:00
color: 'white',
2021-08-17 22:00:09 +00:00
fontSize: 40,
fontWeight: 'bold',
},
separator: {
marginVertical: 10,
height: 1,
width: '80%',
},
});