-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
41 lines (37 loc) · 1.21 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
/* eslint-disable camelcase */
import { NativeBaseProvider, StatusBar } from 'native-base'
import { THEME } from './src/theme'
import { Routes } from './src/routes'
import {
useFonts,
Karla_400Regular,
Karla_700Bold,
} from '@expo-google-fonts/karla'
import { ActivityIndicator } from 'react-native'
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'
import { AuthContextProvider } from './src/contexts/AuthContext'
import { ProductsContextProvider } from './src/contexts/ProductsContext'
export default function App() {
const [fontsLoaded] = useFonts({
Karla_400Regular,
Karla_700Bold,
})
return (
<SafeAreaProvider>
<SafeAreaView style={{ flex: 1, backgroundColor: '#EDECEE' }}>
<NativeBaseProvider theme={THEME}>
<AuthContextProvider>
<ProductsContextProvider>
<StatusBar
barStyle={'dark-content'}
backgroundColor={'transparent'}
translucent={true}
/>
{fontsLoaded ? <Routes /> : <ActivityIndicator />}
</ProductsContextProvider>
</AuthContextProvider>
</NativeBaseProvider>
</SafeAreaView>
</SafeAreaProvider>
)
}