-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
44 lines (39 loc) · 1.27 KB
/
App.js
File metadata and controls
44 lines (39 loc) · 1.27 KB
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
import React from 'react'
import { StatusBar as ExpoStatusBar } from 'expo-status-bar'
import {
useFonts as useOswald,
Oswald_400Regular
} from '@expo-google-fonts/oswald'
import { useFonts as useLato, Lato_400Regular } from '@expo-google-fonts/lato'
import { ThemeProvider } from 'styled-components/native'
import { theme } from './src/infrastructure/theme/index'
import { RestaurantsContextProvider } from './src/services/restaurants/restaurants.context'
import { LocationContextProvider } from './src/services/location/location.context'
import { Navigation } from './src/infrastructure/navigation'
import { FavouritesContextProvider } from './src/services/favourites/favourites.context'
const App = () => {
const [oswaldLoaded] = useOswald({
Oswald_400Regular
})
const [latoLoaded] = useLato({
Lato_400Regular
})
if (!oswaldLoaded || !latoLoaded) {
return null
}
return (
<>
<ThemeProvider theme={theme}>
<FavouritesContextProvider>
<LocationContextProvider>
<RestaurantsContextProvider>
<Navigation />
</RestaurantsContextProvider>
</LocationContextProvider>
</FavouritesContextProvider>
</ThemeProvider>
<ExpoStatusBar style="auto" />
</>
)
}
export default App