You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mobile/app/+not-found.tsx

21 lines
607 B

import {Link, router, Stack, usePathname, useRouter} from 'expo-router';
import {Button, SafeAreaView, StyleSheet, Text, View} from 'react-native';
import React from "react";
export default function NotFoundScreen() {
const pathname = usePathname();
const router = useRouter();
return (
<SafeAreaView>
<Stack.Screen options={{ title: 'Oops!' }} />
<View>
<Text>This screen {pathname} doesn't exist: {pathname}</Text>
<Button title="Retour Home" onPress={() => router.replace("/")}/>
<Text>Go to home screen!</Text>
</View>
</SafeAreaView>
);
}