-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
73 lines (66 loc) · 1.55 KB
/
App.js
File metadata and controls
73 lines (66 loc) · 1.55 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import React from 'react';
import { StyleSheet, Platform, StatusBar } from 'react-native';
import { Container, Content, Root, View, Spinner } from 'native-base';
import TitleBar from './global/TitleBar';
import Coin from './charts/Coin';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
loading: true,
};
}
componentWillMount() {
Expo.Font.loadAsync({
'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
})
.then(() => {
this.setState({
loading: false,
});
});
}
render() {
const { loading } = this.state;
if (loading) {
return (<Spinner />);
}
return (
<Root>
<View style={styles.container}>
<Container>
<TitleBar title="Crypto Tracker" />
<Content>
<Coin
baseAsset="btc"
quoteAsset="usdt"
interval="30m"
/>
<Coin
baseAsset="eth"
quoteAsset="usdt"
interval="30m"
/>
<Coin
baseAsset="xrp"
quoteAsset="usdt"
interval="30m"
/>
</Content>
</Container>
</View>
</Root>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
...Platform.select({
android: {
marginTop: StatusBar.currentHeight,
},
}),
},
});