Add files via upload

This commit is contained in:
Savsis 2026-05-08 16:52:40 +05:00 • committed by GitHub
parent ddac17c6c5
commit 5f4e59b56b
6 changed files with 29 additions and 27 deletions

View file

@ -5,21 +5,7 @@ import { StatusBar } from 'expo-status-bar';
import { useBootAuth } from '../hooks/useAuth';
import { Colors } from '../constants/theme';
export default function RootLayout() {
useBootAuth();
useOTAUpdates();
return (
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
<StatusBar style="light" />
<Stack screenOptions={{ headerShown: false, contentStyle: { backgroundColor: Colors.bg } }}>
<Stack.Screen name="(tabs)" />
<Stack.Screen name="auth" options={{ presentation: 'fullScreenModal' }} />
</Stack>
</GestureHandlerRootView>
);
}
// Must be defined before use — hooks are not hoisted
function useOTAUpdates() {
useEffect(() => {
if (__DEV__) return;
@ -38,3 +24,18 @@ function useOTAUpdates() {
})();
}, []);
}
export default function RootLayout() {
useBootAuth();
useOTAUpdates();
return (
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
<StatusBar style="light" />
<Stack screenOptions={{ headerShown: false, contentStyle: { backgroundColor: Colors.bg } }}>
<Stack.Screen name="(tabs)" />
<Stack.Screen name="auth" options={{ presentation: 'fullScreenModal' }} />
</Stack>
</GestureHandlerRootView>
);
}