-
Notifications
You must be signed in to change notification settings - Fork 6
/
App.js
40 lines (38 loc) · 1.02 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {StyleSheet, Text, View} from 'react-native';
import React, {useEffect} from 'react';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import AppNavigationStack from './src/navigation';
import {trunk} from './src/stores';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {PortalProvider} from '@gorhom/portal';
import {
ConfirmModal,
LoadingIndicatorModal,
PhotoDetailModal,
} from './src/components';
const App = () => {
const [loaded, setLoaded] = React.useState(false);
useEffect(() => {
trunk
.init()
.then(() => {
setLoaded(true);
})
.catch(e => {
console.log('err', e);
});
}, []);
return (
<GestureHandlerRootView style={{flex: 1}}>
<SafeAreaProvider>
<PortalProvider>
<AppNavigationStack />
<PhotoDetailModal />
<ConfirmModal />
</PortalProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
);
};
export default App;
const styles = StyleSheet.create({});