-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tickets.js
73 lines (70 loc) · 1.6 KB
/
Tickets.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
65
66
67
68
69
70
71
72
73
import React from 'react';
import {StyleSheet, Text, View, FlatList, Image} from 'react-native';
import globoTicket from './TicketDB';
const Tickets = () => {
const ticketItem = ({item}) => {
return (
<View style={styles.tickets}>
<View>
<Image style={styles.img} source={item.image} />
</View>
<View>
<Text style={styles.tickettitle}>{item.event}</Text>
<Text style={styles.ticketshortdescription}>
{item.shortDescription}
</Text>
<Text
style={styles.ticketdescription}
numberOfLines={2}
ellipsizeMode="tail">
{item.description}
</Text>
<Text style={styles.tickettitle}>Price: {item.price}</Text>
<Text style={styles.ticketbutton}>Get Tickets</Text>
</View>
</View>
);
};
return (
<View style={styles.container}>
<FlatList
data={globoTicket}
renderItem={ticketItem}
keyExtractor={item => item.eventId}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
paddingTop: 15,
paddingBottom: 15,
},
tickets: {
flexDirection: 'column',
},
img: {
height: 180,
width: '100%',
},
tickettitle: {
fontWeight: 'bold',
textAlign: 'center',
},
ticketshortdescription: {
fontWeight: '600',
textAlign: 'center',
paddingTop: 5,
},
ticketdescription: {
fontWeight: '600',
padding: 15,
},
ticketbutton: {
fontWeight: 'bold',
textAlign: 'center',
paddingBottom: 15,
paddingTop: 5,
},
});
export default Tickets;