-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
31 lines (28 loc) · 827 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
import React from 'react'
import { Provider } from 'react-redux'
import { Tabs } from './components/Tabs'
import Loading from './components/Loading'
import store from './store'
import Expo from 'expo'
const FontAwesome = require('./assets/fontawesome-webfont.ttf')
const MaterialIcons = require('./assets/MaterialIcons-Regular.ttf')
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
fontLoaded: false,
};
}
async componentDidMount() {
await Expo.Font.loadAsync('FontAwesome', FontAwesome)
await Expo.Font.loadAsync('Material Icons', MaterialIcons)
this.setState({ fontLoaded: true })
}
render() {
return (
<Provider store={store}>
{this.state.fontLoaded ? (<Tabs />) : (<Loading />)}
</Provider>
);
}
}