-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
33 lines (29 loc) · 903 Bytes
/
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
import React, { useState } from "react";
import { CategorizationScreen } from "./src/screens/categorization.screen";
import { View } from "react-native";
import * as Font from "expo-font";
import { AppLoading } from "expo";
import { MainScreen } from "./src/screens/main.screen";
const fetchFonts = () => {
return Font.loadAsync({
"Open Sans Semi-Bold": require("./assets/fonts/OpenSans-SemiBold.ttf"),
"Open Sans Bold": require("./assets/fonts/OpenSans-Bold.ttf"),
"Open Sans Regular": require("./assets/fonts/OpenSans-Regular.ttf"),
});
};
export default function App() {
const [dataLoaded, setDataLoaded] = useState(false);
if (!dataLoaded) {
return (
<AppLoading
startAsync={fetchFonts}
onFinish={() => setDataLoaded(true)}
></AppLoading>
);
}
return (
<View style={{ flex: 1 }}>
<MainScreen></MainScreen>
</View>
);
}