-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
36 lines (30 loc) · 1.12 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
// import { Text, SafeAreaView } from 'react-native'
import React, { useState } from 'react'
// import { gStyle } from './styles/style'
import * as Font from "expo-font"
import AppLoading from 'expo-app-loading'
// import Main from './components/Main'
import MainStack from "./navigation";
const fonts = () => {
return Font.loadAsync({
'mt-black': require("./fonts/Montserrat-Black.ttf"),
'mt-bold': require("./fonts/Montserrat-Bold.ttf"),
'mt-extrabold': require("./fonts/Montserrat-ExtraBold.ttf"),
'mt-extralight': require("./fonts/Montserrat-ExtraLight.ttf"),
'mt-light': require("./fonts/Montserrat-Light.ttf"),
'mt-medium': require("./fonts/Montserrat-Medium.ttf"),
'mt-normal': require("./fonts/Montserrat-Regular.ttf"),
'mt-semibold': require("./fonts/Montserrat-SemiBold.ttf"),
'mt-thin': require("./fonts/Montserrat-Thin.ttf"),
})
}
const App = () => {
const [Font, setFont] = useState(false);
if (Font) {
return (
<MainStack />
)
}
return <AppLoading startAsync={fonts} onError={error => console.error(error)} onFinish={() => setFont(true)} />
}
export default App