Add files via upload
This commit is contained in:
parent
d612a65f81
commit
5748d2d13c
31 changed files with 3197 additions and 2492 deletions
|
|
@ -1,40 +1,40 @@
|
|||
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 (
|
||||
<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>
|
||||
);
|
||||
}
|
||||
|
||||
function useOTAUpdates() {
|
||||
useEffect(() => {
|
||||
if (__DEV__) return;
|
||||
(async () => {
|
||||
try {
|
||||
const check = await Updates.checkForUpdateAsync();
|
||||
if (check.isAvailable) {
|
||||
await Updates.fetchUpdateAsync();
|
||||
await Updates.reloadAsync();
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch {
|
||||
// silent fail
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
}
|
||||
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 (
|
||||
<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>
|
||||
);
|
||||
}
|
||||
|
||||
function useOTAUpdates() {
|
||||
useEffect(() => {
|
||||
if (__DEV__) return;
|
||||
(async () => {
|
||||
try {
|
||||
const check = await Updates.checkForUpdateAsync();
|
||||
if (check.isAvailable) {
|
||||
await Updates.fetchUpdateAsync();
|
||||
await Updates.reloadAsync();
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch {
|
||||
// silent fail
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue