2021-08-16 07:50:50 +00:00
|
|
|
import * as React from 'react';
|
|
|
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
|
|
|
2021-08-22 04:30:04 +00:00
|
|
|
import { RootStackScreenProps } from '../types';
|
2021-08-16 07:50:50 +00:00
|
|
|
|
2021-08-22 04:30:04 +00:00
|
|
|
export default function NotFoundScreen({ navigation }: RootStackScreenProps<'NotFound'>) {
|
2021-08-16 07:50:50 +00:00
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<Text style={styles.title}>This screen doesn't exist.</Text>
|
|
|
|
<TouchableOpacity onPress={() => navigation.replace('Root')} style={styles.link}>
|
|
|
|
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
|
|
</TouchableOpacity>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
padding: 20,
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
fontSize: 20,
|
|
|
|
fontWeight: 'bold',
|
|
|
|
},
|
|
|
|
link: {
|
|
|
|
marginTop: 15,
|
|
|
|
paddingVertical: 15,
|
|
|
|
},
|
|
|
|
linkText: {
|
|
|
|
fontSize: 14,
|
|
|
|
color: '#2e78b7',
|
|
|
|
},
|
|
|
|
});
|