-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
64 lines (52 loc) · 1.82 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
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
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import React, { useState, useEffect } from 'react';
import BottomTabs from "./src/components/BottomTab"
const CoinMarketCap = require('coinmarketcap-api')
import services from "./src/services"
import NavStack from "./src/components/Navigation"
import FlashMessage from "react-native-flash-message";
// import { useFonts,Feather} from 'expo-font';
export default function App() {
const apiKey = 'fa55b789-fae7-45c7-8627-9fee4681b042'
const client = new CoinMarketCap(apiKey)
// let [fontsLoaded] = useFonts({
// Avenir: require("./assets/fonts/AvenirLTStd-Book.otf"),
// "Avenir-Bold": require("./assets/fonts/AvenirLTStd-Black.otf"),
// "Avenir-Roman": require("./assets/fonts/AvenirLTStd-Roman.otf"),
// Feather
// });
// client.getGlobal().then(console.log).catch(console.error)
useEffect(() => {
// client.getTickers()
// console.log("NEW SET ++++++++++=")
// client.getGlobal()
// const getCoinsList = getCoinsList;
// console.log("List:", services.getCoinsList());
// get active coins
// client.getIdMap({listingStatus: 'inactive', limit: 10})
// display coins by cmc_rank
// client.getIdMap({sort: 'cmc_rank'})
// get more details for each coin
// client.getMetadata({id: '1'})
// // client.getTickers({limit: 3})
// .then((result) => console.log(result))
// .catch((error) => console.error(error))
});
return (
<View style={styles.container}>
{/* <Text>Crypto currency trakcer app !</Text>
<StatusBar style="auto" /> */}
<NavStack />
<FlashMessage position="top" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
flexDirection:'column',
justifyContent:'center'
},
});