-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
37 lines (30 loc) · 985 Bytes
/
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
import * as Font from 'expo-font'
import React, { useEffect } from 'react'
import SplashScreen from 'react-native-splash-screen'
import { StatusBar } from 'react-native'
import { ThemeProvider } from 'styled-components'
import { Tokens } from 'components'
import { App as Navigator } from 'navigations'
console.disableYellowBox = true
export default function App() {
useEffect(() => {
SplashScreen.hide()
loadResources()
}, [])
return (
<ThemeProvider theme={Tokens}>
<StatusBar barStyle="dark-content" />
<Navigator />
</ThemeProvider>
)
}
async function loadResources() {
await Promise.all([
Font.loadAsync({
'hk-grotesk-bold': require('./src/assets/fonts/HKGrotesk-Bold.otf'),
'hk-grotesk-medium': require('./src/assets/fonts/HKGrotesk-Medium.otf'),
'hk-grotesk-regular': require('./src/assets/fonts/HKGrotesk-Regular.otf'),
'hk-grotesk-light': require('./src/assets/fonts/HKGrotesk-Light.otf')
})
])
}