-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
29 lines (27 loc) · 912 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
import React, { Component } from "react";
import * as Font from "expo-font";
import Loader from "./shared/Loader";
import AppStack from "./routes/AppStack";
export default class App extends Component {
state = {
assetsLoaded: false,
};
async componentDidMount() {
await Font.loadAsync({
"quicksand-regular": require("./assets/fonts/Quicksand-Regular.ttf"),
"quicksand-bold": require("./assets/fonts/Quicksand-Bold.ttf"),
"quicksand-light": require("./assets/fonts/Quicksand-Light.ttf"),
"quicksand-medium": require("./assets/fonts/Quicksand-Medium.ttf"),
"quicksand-semibold": require("./assets/fonts/Quicksand-SemiBold.ttf"),
});
this.setState({ assetsLoaded: true });
}
render() {
const { assetsLoaded } = this.state;
if (assetsLoaded) {
return <AppStack />;
} else {
return <Loader loading={this.state.loading} />;
}
}
}