-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
65 lines (61 loc) · 1.6 KB
/
App.tsx
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
import React, { useEffect } from "react";
import {
View,
StyleSheet,
} from "react-native";
import { ThemedView } from "@/components/ThemedView";
import { ThemedText } from "@/components/ThemedText";
import { StatusBar } from "expo-status-bar";
import { useCoinGeckoStore } from "@/stores";
import CandlestickChart from "@/components/home/CandlestickChart";
import TimeSelector from "@/components/home/TimeSelector";
import OrderBook from "@/components/home/OrderBook";
const HomeScreen = () => {
useEffect(() => {
useCoinGeckoStore.getState().fetchData();
}, []);
return (
<ThemedView style={{ paddingTop: 60, flex: 1 }}>
<StatusBar style="light" />
<View style={styles.titleContainer}>
<ThemedText style={styles.smallText}>Bitcoin Price</ThemedText>
<View style={styles.priceContainer}>
<ThemedText style={styles.boldText}>Rp 1.106.550.546</ThemedText>
<ThemedText style={styles.percentageText}>1.34%</ThemedText>
</View>
</View>
<View style={styles.chartContent}>
<CandlestickChart />
<TimeSelector />
</View>
<OrderBook />
</ThemedView>
);
};
const styles = StyleSheet.create({
titleContainer: {
paddingHorizontal: 16,
},
smallText: {
fontSize: 12,
},
priceContainer: {
marginBottom: 10,
flexDirection: "row",
alignItems: "center",
},
boldText: {
fontSize: 18,
fontWeight: "bold",
},
percentageText: {
fontSize: 12,
fontWeight: "bold",
color: "green",
marginLeft: 10,
},
chartContent: {
marginBottom: 16
}
});
export default HomeScreen;