expo_template/app/+not-found.tsx

29 lines
786 B
TypeScript
Raw Normal View History

2025-01-28 08:19:46 -06:00
import { Link, Stack } from 'expo-router';
import { StyleSheet } from 'react-native';
import { ThemedText, ThemedView } from '@/components/theme/Theme';
import TextButton from '@/components/theme/buttons/TextButton';
2025-01-28 08:19:46 -06:00
const NotFoundScreen = () => {
2025-01-28 08:19:46 -06:00
return (
<>
<Stack.Screen options={{ title: 'Page not found' }} />
2025-01-28 08:19:46 -06:00
<ThemedView style={styles.container}>
2025-01-28 08:45:02 -06:00
<ThemedText type='title'>This screen doesn't exist.</ThemedText>
<Link href='/'>
<TextButton width={200} height={45} text='Go to home screen' fontSize={24} />
2025-01-28 08:19:46 -06:00
</Link>
</ThemedView>
</>
);
};
export default NotFoundScreen;
2025-01-28 08:19:46 -06:00
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: 20,
},
});