import { useEffect } from 'react'; import { Stack } from 'expo-router'; import * as SplashScreen from 'expo-splash-screen'; import { StatusBar } from 'expo-status-bar'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { StyleSheet } from 'react-native'; import 'react-native-reanimated'; import { useDataStore } from '../src/stores/dataStore'; import { ConnectModal } from '../src/components/modals/ConnectModal'; SplashScreen.preventAutoHideAsync(); export { ErrorBoundary } from 'expo-router'; export default function RootLayout() { const init = useDataStore((s) => s.init); useEffect(() => { init().finally(() => SplashScreen.hideAsync()); }, []); return ( {/* ConnectModal is global — accessible from any tab */} ); } const styles = StyleSheet.create({ root: { flex: 1 } });