import { router, Stack, usePathname } from "expo-router";
import { Button, Text, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";

export default function NotFoundScreen() {
  const pathname = usePathname();

  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>
  );
}
