removed splashscreen dependency (deprecated)

This commit is contained in:
Martin Bauer 2023-10-28 14:06:08 +02:00
parent 3c62e1e04b
commit 977d4bcbc9
1 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import React from 'react';
import AppLoading from 'expo-app-loading';
import * as SplashScreen from 'expo-splash-screen';
import { Ionicons } from '@expo/vector-icons';
import * as Font from 'expo-font';
@ -37,6 +37,9 @@ const store = createStore(persistedReducer);
const persistor = persistStore(store);
const Stack = createStackNavigator();
// Keep the splash screen visible while we fetch resources
SplashScreen.preventAutoHideAsync();
export default class App extends React.Component {
constructor(props) {
super(props);
@ -70,9 +73,10 @@ export default class App extends React.Component {
}
render() {
if (!this.state.isReady) {
return <AppLoading />;
if(this.state.isReady) {
SplashScreen.hideAsync();
}
const screenOptions = {
headerShown: false,
};
@ -137,8 +141,8 @@ export default class App extends React.Component {
return (
<Provider store={store}>
<PersistGate loading={<AppLoading />} persistor={persistor}>
<NavigationContainer>
<PersistGate persistor={persistor}>
<NavigationContainer >
<Stack.Navigator >
{activeView}
</Stack.Navigator>