-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
60 lines (47 loc) · 1.81 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { useEffect, useState } from 'react';
import { AppNavigation } from './src/navigations';
import { useFonts } from 'expo-font';
import * as SplScreen from 'expo-splash-screen';
import * as Location from 'expo-location'
const App = () => {
const StyleTypes = ["default", "dark-content", "light-content"];
const [visibleStatusBar, sentvisibleStatusBar] = useState(false);
const [styleStatusBar, setStyleStatusBar] = useState(StyleTypes[2]);
// const [location, setLocation] = useState(null);
// const [errorMsg, setErrorMsg] = useState(null);
let [fontsLoaded] = useFonts({
"SoDoSans-Regular": require('./assets/fonts/SoDoSans-Regular.ttf'),
"SoDoSans-SemiBold": require('./assets/fonts/SoDoSans-SemiBold.ttf'),
"SoDoSans-Bold": require('./assets/fonts/SoDoSans-Bold.ttf'),
"SoDoSans-Black": require('./assets/fonts/SoDoSans-Black.ttf'),
"OpenSans-Light": require('./assets/fonts/OpenSans-Light.ttf'),
"OpenSans-Regular": require('./assets/fonts/OpenSans-Regular.ttf'),
"OpenSans-SemiBold": require('./assets/fonts/OpenSans-Semibold.ttf'),
"OpenSans-Bold": require('./assets/fonts/OpenSans-Bold.ttf'),
"OpenSans-ExtraBold": require('./assets/fonts/OpenSans-ExtraBold.ttf'),
});
useEffect(() => {
async function prepare() {
// let { status } = await Location.requestForegroundPermissionsAsync();
// if (status !== 'granted') {
// setErrorMsg('Permission to access location was denied');
// return;
// }
// let location = await Location.getCurrentPositionAsync();
// setLocation(location)
await SplScreen.preventAutoHideAsync();
}
prepare();
}, []);
// console.log(location)
if (!fontsLoaded) {
return undefined;
}
else {
SplScreen.hideAsync();
}
return (
<AppNavigation/>
)
}
export default App