-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
83 lines (72 loc) · 2.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import "react-native-url-polyfill/auto"
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { ActivityIndicator, StatusBar as RNStatusBar, View } from 'react-native';
import Routes from './src/routes';
import {
Poppins_400Regular,
Poppins_600SemiBold, useFonts
} from '@expo-google-fonts/poppins';
import { Image, NativeBaseProvider, VStack } from 'native-base';
import { GoalsContextProvider } from './src/context/GoalsContext';
import { MarketContextProvider } from './src/context/MarketContext';
import { PagesContextProvider } from './src/context/PagesContext';
import { PaymentsContextProvider } from './src/context/PaymentsContext';
import { RunsContextProvider } from './src/context/RunsContext';
import { SettingsContextProvider } from './src/context/SettingsContext';
import logo from './src/assets/icon.png';
import { LogBox } from "react-native";
LogBox.ignoreLogs([
'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.',
])
export default function App() {
let [fontsLoaded] = useFonts({
Poppins_400Regular,
Poppins_600SemiBold,
});
if (!fontsLoaded) {
return (
<NativeBaseProvider>
<VStack
flex={1}
alignItems="center"
justifyContent="center"
bg={"#581c87"}
>
<Image
alt="logo"
source={logo}
size={100}
mb={24}
/>
<ActivityIndicator size={24} color={"#FFF"} />
</VStack>
</NativeBaseProvider>
)
}
return (
<>
<View style={{
height: RNStatusBar.currentHeight,
backgroundColor: '#581c87'
}}>
<StatusBar style="light" />
</View>
<NativeBaseProvider>
<PagesContextProvider>
<SettingsContextProvider>
<PaymentsContextProvider>
<RunsContextProvider>
<MarketContextProvider>
<GoalsContextProvider>
<Routes />
</GoalsContextProvider>
</MarketContextProvider>
</RunsContextProvider>
</PaymentsContextProvider>
</SettingsContextProvider>
</PagesContextProvider>
</NativeBaseProvider>
</>
);
}