+not-found.tsx (704B)
1 import { StyleSheet } from "react-native"; 2 import { Link, Stack } from "expo-router"; 3 import { SafeAreaView } from "react-native-safe-area-context"; 4 5 export default function NotFoundScreen() { 6 return ( 7 <SafeAreaView style={styles.container}> 8 <Stack.Screen options={{ title: "Page Not Found" }} /> 9 <Link href="/" style={styles.button}> 10 Go back to home 11 </Link> 12 </SafeAreaView> 13 ); 14 } 15 16 const styles = StyleSheet.create({ 17 container: { 18 flex: 1, 19 backgroundColor: "#25292e", 20 alignItems: "center", 21 justifyContent: "center", 22 }, 23 text: { 24 color: "#fff", 25 }, 26 button: { 27 fontSize: 20, 28 textDecorationLine: "underline", 29 color: "#fff", 30 }, 31 });