-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
44 lines (37 loc) · 1.05 KB
/
App.tsx
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
import 'react-native-gesture-handler';
import { StatusBar, View, Platform } from 'react-native';
import {
useFonts,
Recursive_400Regular,
Recursive_500Medium,
Recursive_600SemiBold,
Recursive_700Bold
} from '@expo-google-fonts/recursive';
import { Routes } from './src/routes';
import { Loading } from './src/components/Loading';
import { UserContextProvider } from './src/context/UserContext';
import { ChallengeEnrollContextProvider } from './src/context/ChallengeEnrollContext';
export default function App() {
const [fontsLoaded] = useFonts({
Recursive_400Regular,
Recursive_500Medium,
Recursive_600SemiBold,
Recursive_700Bold
})
return (
<View style={[{ flex: 1 }, Platform.OS === "android" ? { paddingTop: StatusBar.currentHeight } : null ]}>
<StatusBar
barStyle="dark-content"
backgroundColor="transparent"
translucent
/>
{ fontsLoaded ?
<UserContextProvider>
<Routes />
</UserContextProvider>
:
<Loading />
}
</View>
);
}