- Updated App.tsx to use proper Stack navigation - Created ESM-compatible metro.config.js - Fixed module resolution for monorepo structure - Dev server now starts successfully Ready to test on physical devices via Expo Go app
33 lines
716 B
TypeScript
33 lines
716 B
TypeScript
import { useFonts } from 'expo-font';
|
|
import { SplashScreen, Stack } from 'expo-router';
|
|
import { useEffect } from 'react';
|
|
|
|
export {
|
|
// Catch any errors thrown by the Layout component.
|
|
ErrorBoundary,
|
|
} from 'expo-router';
|
|
|
|
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
|
SplashScreen.preventAutoHideAsync();
|
|
|
|
export default function RootLayout() {
|
|
const [fontsLoaded, fontError] = useFonts({});
|
|
|
|
useEffect(() => {
|
|
if (fontsLoaded || fontError) {
|
|
SplashScreen.hideAsync();
|
|
}
|
|
}, [fontsLoaded, fontError]);
|
|
|
|
if (!fontsLoaded && !fontError) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Stack
|
|
screenOptions={{
|
|
headerShown: false,
|
|
}}
|
|
/>
|
|
);
|
|
}
|