chore: build
This commit is contained in:
+18
-1
@@ -1,6 +1,7 @@
|
||||
import React, { useMemo } from "react";
|
||||
import React, { useMemo, useEffect } from "react";
|
||||
import { StatusBar } from "expo-status-bar";
|
||||
import { ActivityIndicator, View, StyleSheet } from "react-native";
|
||||
import * as Updates from "expo-updates";
|
||||
import { NavigationContainer } from "@react-navigation/native";
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
||||
|
||||
@@ -91,6 +92,22 @@ function RootNavigator() {
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
useEffect(() => {
|
||||
if (__DEV__) return;
|
||||
const checkForUpdate = async () => {
|
||||
try {
|
||||
const update = await Updates.checkForUpdateAsync();
|
||||
if (update.isAvailable) {
|
||||
await Updates.fetchUpdateAsync();
|
||||
await Updates.reloadAsync();
|
||||
}
|
||||
} catch {
|
||||
// Silently ignore update errors
|
||||
}
|
||||
};
|
||||
checkForUpdate();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<AuthProvider>
|
||||
|
||||
Reference in New Issue
Block a user