import { useEffect } from 'react'; import { Stack } from 'expo-router'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { StatusBar } from 'expo-status-bar'; import * as Updates from 'expo-updates'; import { useBootAuth } from '../hooks/useAuth'; import { Colors } from '../constants/theme'; export default function RootLayout() { useBootAuth(); useOTAUpdates(); return ( ); } function useOTAUpdates() { useEffect(() => { if (__DEV__) return; (async () => { try { const check = await Updates.checkForUpdateAsync(); if (check.isAvailable) { await Updates.fetchUpdateAsync(); await Updates.reloadAsync(); } } catch { // silent fail } })(); }, []); }