- add babel.config.js with unstable_transformImportMeta: zustand/middleware ships import.meta.env, which the Metro web bundle (a classic script) cannot parse, so every page threw 'SyntaxError: Cannot use import.meta outside a module' and the app never hydrated after the static export. - declare the settings screen as 'settings/index' in the root stack: the old name 'settings' matched no route, so the modal presentation and the 'Settings' title were silently dropped (expo-router logged 'No route named settings exists'). - add the missing app/+not-found.tsx that the root layout already referenced. - update the About label from LocalAiApp to LocalMind.
39 lines
797 B
TypeScript
39 lines
797 B
TypeScript
import { Link, Stack } from 'expo-router';
|
|
import { StyleSheet, Text, View } from 'react-native';
|
|
|
|
export default function NotFoundScreen() {
|
|
return (
|
|
<>
|
|
<Stack.Screen options={{ title: 'Oops!' }} />
|
|
<View style={styles.container}>
|
|
<Text style={styles.title}>This screen does not exist.</Text>
|
|
|
|
<Link href="/" style={styles.link}>
|
|
<Text style={styles.linkText}>Go to home screen</Text>
|
|
</Link>
|
|
</View>
|
|
</>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
padding: 20,
|
|
},
|
|
title: {
|
|
fontSize: 20,
|
|
fontWeight: 'bold',
|
|
},
|
|
link: {
|
|
marginTop: 15,
|
|
paddingVertical: 15,
|
|
},
|
|
linkText: {
|
|
fontSize: 14,
|
|
color: '#2e78b7',
|
|
},
|
|
});
|