-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
38 lines (36 loc) · 1.24 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
37
38
import React from 'react';
import * as Font from 'expo-font';
import { View, ActivityIndicator } from 'react-native';
import { LogBox } from 'react-native';
import AppContainer from './src/routes';
import { colors } from './src/utils/colors';
import {Text} from 'react-native'
LogBox.ignoreLogs(['Warning: ...']); // Ignore log notification by message
LogBox.ignoreAllLogs();//Ignore all log notifications
console.disableYellowBox = true;
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
fontLoaded: false,
};
}
async componentDidMount() {
await Font.loadAsync({
'Poppins-Regular': require('./src/assets/font/Poppins/Poppins-Regular.ttf'),
'Poppins-Bold': require('./src/assets/font/Poppins/Poppins-Bold.ttf'),
});
this.setState({ fontLoaded: true });
}
render() {
if (this.state.fontLoaded) {
return (
<AppContainer />
);
} return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<ActivityIndicator size="large" color={colors.greenColor} />
</View>
);
}
}