be-components 7.3.9 → 7.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/CreateEngagement/index.js +3 -0
- package/lib/commonjs/CreateEngagement/index.js.map +1 -1
- package/lib/commonjs/FlashMarket/api/index.js +61 -0
- package/lib/commonjs/FlashMarket/api/index.js.map +1 -1
- package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js +91 -83
- package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js.map +1 -1
- package/lib/commonjs/FlashMarket/index.js +67 -42
- package/lib/commonjs/FlashMarket/index.js.map +1 -1
- package/lib/commonjs/MyAction/api/index.js +580 -0
- package/lib/commonjs/MyAction/api/index.js.map +1 -0
- package/lib/commonjs/MyAction/components/BracketRow.js +67 -0
- package/lib/commonjs/MyAction/components/BracketRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/CompetitionRow.js +68 -0
- package/lib/commonjs/MyAction/components/CompetitionRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/ContestStatRow.js +265 -0
- package/lib/commonjs/MyAction/components/ContestStatRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/FlashRow.js +131 -0
- package/lib/commonjs/MyAction/components/FlashRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/ParlayRow.js +236 -0
- package/lib/commonjs/MyAction/components/ParlayRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/SquaresRow.js +83 -0
- package/lib/commonjs/MyAction/components/SquaresRow.js.map +1 -0
- package/lib/commonjs/MyAction/index.js +354 -0
- package/lib/commonjs/MyAction/index.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/EmbedManager.js +42 -0
- package/lib/commonjs/PartnerPortal/components/EmbedManager.js.map +1 -1
- package/lib/commonjs/PartnerPortal/components/StringSelector.js +90 -0
- package/lib/commonjs/PartnerPortal/components/StringSelector.js.map +1 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/CreateEngagement/index.js +3 -0
- package/lib/module/CreateEngagement/index.js.map +1 -1
- package/lib/module/FlashMarket/api/index.js +61 -0
- package/lib/module/FlashMarket/api/index.js.map +1 -1
- package/lib/module/FlashMarket/components/ManageFlashMarket.js +91 -83
- package/lib/module/FlashMarket/components/ManageFlashMarket.js.map +1 -1
- package/lib/module/FlashMarket/index.js +67 -42
- package/lib/module/FlashMarket/index.js.map +1 -1
- package/lib/module/MyAction/api/index.js +573 -0
- package/lib/module/MyAction/api/index.js.map +1 -0
- package/lib/module/MyAction/components/BracketRow.js +60 -0
- package/lib/module/MyAction/components/BracketRow.js.map +1 -0
- package/lib/module/MyAction/components/CompetitionRow.js +61 -0
- package/lib/module/MyAction/components/CompetitionRow.js.map +1 -0
- package/lib/module/MyAction/components/ContestStatRow.js +258 -0
- package/lib/module/MyAction/components/ContestStatRow.js.map +1 -0
- package/lib/module/MyAction/components/FlashRow.js +124 -0
- package/lib/module/MyAction/components/FlashRow.js.map +1 -0
- package/lib/module/MyAction/components/ParlayRow.js +229 -0
- package/lib/module/MyAction/components/ParlayRow.js.map +1 -0
- package/lib/module/MyAction/components/SquaresRow.js +76 -0
- package/lib/module/MyAction/components/SquaresRow.js.map +1 -0
- package/lib/module/MyAction/index.js +344 -0
- package/lib/module/MyAction/index.js.map +1 -0
- package/lib/module/PartnerPortal/components/EmbedManager.js +42 -0
- package/lib/module/PartnerPortal/components/EmbedManager.js.map +1 -1
- package/lib/module/PartnerPortal/components/StringSelector.js +83 -0
- package/lib/module/PartnerPortal/components/StringSelector.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/CreateEngagement/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/FlashMarket/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MyAction/api/index.d.ts +110 -0
- package/lib/typescript/lib/commonjs/MyAction/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/BracketRow.d.ts +8 -0
- package/lib/typescript/lib/commonjs/MyAction/components/BracketRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/CompetitionRow.d.ts +9 -0
- package/lib/typescript/lib/commonjs/MyAction/components/CompetitionRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ContestStatRow.d.ts +15 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ContestStatRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/FlashRow.d.ts +10 -0
- package/lib/typescript/lib/commonjs/MyAction/components/FlashRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ParlayRow.d.ts +15 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ParlayRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/SquaresRow.d.ts +8 -0
- package/lib/typescript/lib/commonjs/MyAction/components/SquaresRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/index.d.ts +7 -0
- package/lib/typescript/lib/commonjs/MyAction/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/PartnerPortal/components/StringSelector.d.ts +8 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/StringSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/CreateEngagement/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/FlashMarket/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MyAction/api/index.d.ts +110 -0
- package/lib/typescript/lib/module/MyAction/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/BracketRow.d.ts +8 -0
- package/lib/typescript/lib/module/MyAction/components/BracketRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/CompetitionRow.d.ts +9 -0
- package/lib/typescript/lib/module/MyAction/components/CompetitionRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/ContestStatRow.d.ts +15 -0
- package/lib/typescript/lib/module/MyAction/components/ContestStatRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/FlashRow.d.ts +10 -0
- package/lib/typescript/lib/module/MyAction/components/FlashRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/ParlayRow.d.ts +15 -0
- package/lib/typescript/lib/module/MyAction/components/ParlayRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/SquaresRow.d.ts +8 -0
- package/lib/typescript/lib/module/MyAction/components/SquaresRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/index.d.ts +7 -0
- package/lib/typescript/lib/module/MyAction/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/PartnerPortal/components/StringSelector.d.ts +8 -0
- package/lib/typescript/lib/module/PartnerPortal/components/StringSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +2 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/CreateEngagement/index.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/api/index.d.ts +1 -0
- package/lib/typescript/src/FlashMarket/api/index.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MyAction/api/index.d.ts +103 -0
- package/lib/typescript/src/MyAction/api/index.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/BracketRow.d.ts +10 -0
- package/lib/typescript/src/MyAction/components/BracketRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/CompetitionRow.d.ts +15 -0
- package/lib/typescript/src/MyAction/components/CompetitionRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/ContestStatRow.d.ts +18 -0
- package/lib/typescript/src/MyAction/components/ContestStatRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/FlashRow.d.ts +12 -0
- package/lib/typescript/src/MyAction/components/FlashRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/ParlayRow.d.ts +18 -0
- package/lib/typescript/src/MyAction/components/ParlayRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/SquaresRow.d.ts +10 -0
- package/lib/typescript/src/MyAction/components/SquaresRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/index.d.ts +14 -0
- package/lib/typescript/src/MyAction/index.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
- package/lib/typescript/src/PartnerPortal/components/StringSelector.d.ts +10 -0
- package/lib/typescript/src/PartnerPortal/components/StringSelector.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/CreateEngagement/index.tsx +4 -1
- package/src/FlashMarket/api/index.ts +72 -0
- package/src/FlashMarket/components/ManageFlashMarket.tsx +28 -2
- package/src/FlashMarket/index.tsx +39 -24
- package/src/MyAction/api/index.ts +393 -0
- package/src/MyAction/components/BracketRow.tsx +34 -0
- package/src/MyAction/components/CompetitionRow.tsx +39 -0
- package/src/MyAction/components/ContestStatRow.tsx +153 -0
- package/src/MyAction/components/FlashRow.tsx +74 -0
- package/src/MyAction/components/ParlayRow.tsx +137 -0
- package/src/MyAction/components/SquaresRow.tsx +55 -0
- package/src/MyAction/index.tsx +316 -0
- package/src/PartnerPortal/components/EmbedManager.tsx +20 -0
- package/src/PartnerPortal/components/StringSelector.tsx +55 -0
- package/src/index.tsx +2 -0
- package/src/types.d.ts +12 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button, Text, View } from "../../Components/Themed";
|
|
3
|
+
import { useColors } from '../../constants/useColors';
|
|
4
|
+
import { Icons } from '../../Components';
|
|
5
|
+
import { MyActionHelpers } from '../api';
|
|
6
|
+
import { FlatList, Image } from 'react-native';
|
|
7
|
+
import { AthleteImage, TeamImage } from '../../Components/Jerseys';
|
|
8
|
+
import { MarketComponentHelpers } from '../../MarketComponents/api';
|
|
9
|
+
const ParlayRow = ({
|
|
10
|
+
market_type,
|
|
11
|
+
parlay,
|
|
12
|
+
events,
|
|
13
|
+
matches,
|
|
14
|
+
tournaments,
|
|
15
|
+
athletes,
|
|
16
|
+
teams,
|
|
17
|
+
parlay_orders,
|
|
18
|
+
parlay_positions,
|
|
19
|
+
leagues
|
|
20
|
+
}) => {
|
|
21
|
+
const Colors = useColors();
|
|
22
|
+
const [expanded, setExpanded] = useState(false);
|
|
23
|
+
const cl = market_type == 'FOR_MONEY' ? '$' : 'E';
|
|
24
|
+
const legs = parlay_orders.length;
|
|
25
|
+
const {
|
|
26
|
+
stake,
|
|
27
|
+
result_ind,
|
|
28
|
+
winnings,
|
|
29
|
+
potential_winnings
|
|
30
|
+
} = MyActionHelpers.aggregatePositions(parlay, parlay_positions);
|
|
31
|
+
const settled = result_ind ? true : false;
|
|
32
|
+
const renderLegResult = result_ind => {
|
|
33
|
+
switch (result_ind) {
|
|
34
|
+
case 'win':
|
|
35
|
+
return /*#__PURE__*/React.createElement(Icons.CheckIcon, {
|
|
36
|
+
size: 14,
|
|
37
|
+
color: Colors.text.success
|
|
38
|
+
});
|
|
39
|
+
case 'lose':
|
|
40
|
+
return /*#__PURE__*/React.createElement(Icons.CloseIcon, {
|
|
41
|
+
size: 14,
|
|
42
|
+
color: Colors.text.error
|
|
43
|
+
});
|
|
44
|
+
case 'draw':
|
|
45
|
+
return /*#__PURE__*/React.createElement(Icons.AlertIcon, {
|
|
46
|
+
size: 14,
|
|
47
|
+
color: Colors.text.warning
|
|
48
|
+
});
|
|
49
|
+
default:
|
|
50
|
+
return /*#__PURE__*/React.createElement(Icons.ActivityIcon, {
|
|
51
|
+
size: 14,
|
|
52
|
+
color: Colors.text.h1
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const renderOrders = data => {
|
|
57
|
+
const {
|
|
58
|
+
contest_title,
|
|
59
|
+
athlete,
|
|
60
|
+
team,
|
|
61
|
+
league
|
|
62
|
+
} = MyActionHelpers.getDetailsForOrder(data.item, events, tournaments, matches, athletes, teams, leagues);
|
|
63
|
+
const result_ind = data.item.positions[0]?.result_ind;
|
|
64
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
65
|
+
type: "row",
|
|
66
|
+
style: {
|
|
67
|
+
padding: 10,
|
|
68
|
+
borderBottomWidth: 1,
|
|
69
|
+
borderColor: Colors.borders.light
|
|
70
|
+
}
|
|
71
|
+
}, team ? /*#__PURE__*/React.createElement(TeamImage, {
|
|
72
|
+
team: team,
|
|
73
|
+
league: league,
|
|
74
|
+
size: 10
|
|
75
|
+
}) : athlete ? /*#__PURE__*/React.createElement(AthleteImage, {
|
|
76
|
+
athlete: athlete,
|
|
77
|
+
league: league,
|
|
78
|
+
size: 18
|
|
79
|
+
}) : league ? /*#__PURE__*/React.createElement(Image, {
|
|
80
|
+
source: {
|
|
81
|
+
uri: league.league_image
|
|
82
|
+
},
|
|
83
|
+
style: {
|
|
84
|
+
height: 18,
|
|
85
|
+
width: 18
|
|
86
|
+
},
|
|
87
|
+
resizeMode: "cover"
|
|
88
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
|
|
89
|
+
transparent: true,
|
|
90
|
+
style: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
marginLeft: 8
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
95
|
+
theme: "h2"
|
|
96
|
+
}, data.item.title), /*#__PURE__*/React.createElement(View, {
|
|
97
|
+
transparent: true,
|
|
98
|
+
style: {
|
|
99
|
+
marginTop: 3
|
|
100
|
+
}
|
|
101
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
102
|
+
theme: "description"
|
|
103
|
+
}, contest_title))), data.item.resolution_status != 'closed' ? /*#__PURE__*/React.createElement(Button, {
|
|
104
|
+
transparent: true,
|
|
105
|
+
style: {
|
|
106
|
+
marginRight: 4,
|
|
107
|
+
marginLeft: 4,
|
|
108
|
+
padding: 10,
|
|
109
|
+
flexDirection: 'row',
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
alignItems: 'center'
|
|
112
|
+
},
|
|
113
|
+
onPress: () => console.log('ehy')
|
|
114
|
+
}, /*#__PURE__*/React.createElement(Icons.ActivityIcon, {
|
|
115
|
+
size: 18,
|
|
116
|
+
color: Colors.text.action
|
|
117
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
118
|
+
theme: "action"
|
|
119
|
+
}, " View")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
|
|
120
|
+
style: {
|
|
121
|
+
padding: 10
|
|
122
|
+
}
|
|
123
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
124
|
+
theme: "description"
|
|
125
|
+
}, MarketComponentHelpers.getOddsLabel(data.item.odds))), renderLegResult(result_ind), result_ind == 'draw' ? /*#__PURE__*/React.createElement(View, {
|
|
126
|
+
type: "blur",
|
|
127
|
+
style: {
|
|
128
|
+
position: 'absolute',
|
|
129
|
+
top: 0,
|
|
130
|
+
left: 0,
|
|
131
|
+
right: 0,
|
|
132
|
+
bottom: 0,
|
|
133
|
+
justifyContent: 'center'
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
136
|
+
style: {
|
|
137
|
+
borderBottomWidth: 1,
|
|
138
|
+
borderColor: Colors.borders.light,
|
|
139
|
+
marginRight: 20,
|
|
140
|
+
marginLeft: 20
|
|
141
|
+
}
|
|
142
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
143
|
+
};
|
|
144
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
145
|
+
transparent: true,
|
|
146
|
+
style: {
|
|
147
|
+
padding: 10,
|
|
148
|
+
borderBottomWidth: 1,
|
|
149
|
+
borderColor: Colors.borders.light,
|
|
150
|
+
borderWidth: expanded ? 1 : undefined
|
|
151
|
+
}
|
|
152
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
153
|
+
type: "row",
|
|
154
|
+
style: {
|
|
155
|
+
flexWrap: 'wrap'
|
|
156
|
+
}
|
|
157
|
+
}, /*#__PURE__*/React.createElement(Icons.ParlayIcon, {
|
|
158
|
+
size: 20,
|
|
159
|
+
color: Colors.text.h1
|
|
160
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
161
|
+
transparent: true,
|
|
162
|
+
style: {
|
|
163
|
+
borderRadius: 0,
|
|
164
|
+
padding: 0,
|
|
165
|
+
borderLeftWidth: 1,
|
|
166
|
+
borderColor: Colors.borders.light,
|
|
167
|
+
flexGrow: 1,
|
|
168
|
+
marginLeft: 6,
|
|
169
|
+
paddingLeft: 6,
|
|
170
|
+
minWidth: 75
|
|
171
|
+
},
|
|
172
|
+
onPress: () => setExpanded(!expanded)
|
|
173
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
174
|
+
theme: "h1"
|
|
175
|
+
}, parlay.name), /*#__PURE__*/React.createElement(Text, {
|
|
176
|
+
theme: "light",
|
|
177
|
+
style: {
|
|
178
|
+
marginTop: 3
|
|
179
|
+
},
|
|
180
|
+
color: Colors.text.action
|
|
181
|
+
}, "See ", legs, " legs")), /*#__PURE__*/React.createElement(View, {
|
|
182
|
+
style: {
|
|
183
|
+
margin: 5,
|
|
184
|
+
minWidth: 40,
|
|
185
|
+
justifyContent: 'center',
|
|
186
|
+
alignItems: 'center'
|
|
187
|
+
}
|
|
188
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
189
|
+
theme: "h1",
|
|
190
|
+
color: Colors.text.warning
|
|
191
|
+
}, cl, stake.toFixed(2)), /*#__PURE__*/React.createElement(Text, {
|
|
192
|
+
theme: "light",
|
|
193
|
+
color: Colors.text.warning
|
|
194
|
+
}, "Risk")), settled ? /*#__PURE__*/React.createElement(View, {
|
|
195
|
+
style: {
|
|
196
|
+
margin: 5,
|
|
197
|
+
minWidth: 40,
|
|
198
|
+
justifyContent: 'center',
|
|
199
|
+
alignItems: 'center'
|
|
200
|
+
}
|
|
201
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
202
|
+
theme: "h1"
|
|
203
|
+
}, cl, winnings.toFixed(2)), /*#__PURE__*/React.createElement(Text, {
|
|
204
|
+
theme: "light"
|
|
205
|
+
}, "Winnings")) : /*#__PURE__*/React.createElement(View, {
|
|
206
|
+
style: {
|
|
207
|
+
margin: 5,
|
|
208
|
+
minWidth: 40,
|
|
209
|
+
justifyContent: 'center',
|
|
210
|
+
alignItems: 'center'
|
|
211
|
+
}
|
|
212
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
213
|
+
theme: "h1"
|
|
214
|
+
}, cl, potential_winnings.toFixed(2)), /*#__PURE__*/React.createElement(Text, {
|
|
215
|
+
theme: "light"
|
|
216
|
+
}, "Potential"))), expanded ? /*#__PURE__*/React.createElement(View, {
|
|
217
|
+
transparent: true,
|
|
218
|
+
style: {
|
|
219
|
+
padding: 10
|
|
220
|
+
}
|
|
221
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
222
|
+
data: parlay_orders,
|
|
223
|
+
keyExtractor: item => item.order_id.toString(),
|
|
224
|
+
renderItem: renderOrders,
|
|
225
|
+
key: `parlay_${parlay.parlay_id}_orders`
|
|
226
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
227
|
+
};
|
|
228
|
+
export default ParlayRow;
|
|
229
|
+
//# sourceMappingURL=ParlayRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Button","Text","View","useColors","Icons","MyActionHelpers","FlatList","Image","AthleteImage","TeamImage","MarketComponentHelpers","ParlayRow","market_type","parlay","events","matches","tournaments","athletes","teams","parlay_orders","parlay_positions","leagues","Colors","expanded","setExpanded","cl","legs","length","stake","result_ind","winnings","potential_winnings","aggregatePositions","settled","renderLegResult","createElement","CheckIcon","size","color","text","success","CloseIcon","error","AlertIcon","warning","ActivityIcon","h1","renderOrders","data","contest_title","athlete","team","league","getDetailsForOrder","item","positions","type","style","padding","borderBottomWidth","borderColor","borders","light","source","uri","league_image","height","width","resizeMode","Fragment","transparent","flex","marginLeft","theme","title","marginTop","resolution_status","marginRight","flexDirection","justifyContent","alignItems","onPress","console","log","action","getOddsLabel","odds","position","top","left","right","bottom","borderWidth","undefined","flexWrap","ParlayIcon","borderRadius","borderLeftWidth","flexGrow","paddingLeft","minWidth","name","margin","toFixed","keyExtractor","order_id","toString","renderItem","key","parlay_id"],"sourceRoot":"../../../../src","sources":["MyAction/components/ParlayRow.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,MAAM,EAAEC,IAAI,EAAEC,IAAI,QAAQ,yBAAyB;AAE5D,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,eAAe,QAAQ,QAAQ;AACxC,SAASC,QAAQ,EAAEC,KAAK,QAAQ,cAAc;AAC9C,SAASC,YAAY,EAAEC,SAAS,QAAQ,0BAA0B;AAClE,SAASC,sBAAsB,QAAQ,4BAA4B;AAgBnE,MAAMC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AAC,gBACN/G,KAAA,CAAAqC,aAAA,CAAArC,KAAA,CAAAuE,QAAA,MAAI,CACH,CAAC;AAEf,CAAC;AAED,eAAe1D,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button, Text, View } from "../../Components/Themed";
|
|
3
|
+
import { useColors } from '../../constants/useColors';
|
|
4
|
+
import { Icons } from '../../Components';
|
|
5
|
+
import { FlatList } from 'react-native';
|
|
6
|
+
const SquaresRow = ({
|
|
7
|
+
market_type,
|
|
8
|
+
squares_competition,
|
|
9
|
+
width
|
|
10
|
+
}) => {
|
|
11
|
+
const Colors = useColors();
|
|
12
|
+
const [expanded, setExpanded] = useState(false);
|
|
13
|
+
const cl = market_type == 'FOR_MONEY' ? '$' : 'E';
|
|
14
|
+
const renderSquares = data => {
|
|
15
|
+
console.log(data.item);
|
|
16
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, null, "SQUARE"));
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
19
|
+
type: "row",
|
|
20
|
+
style: {
|
|
21
|
+
padding: 10,
|
|
22
|
+
borderBottomWidth: 1,
|
|
23
|
+
borderColor: Colors.borders.light,
|
|
24
|
+
flexWrap: 'wrap'
|
|
25
|
+
}
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Icons.SquaresIcon, {
|
|
27
|
+
size: 22,
|
|
28
|
+
color: Colors.text.h1
|
|
29
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
30
|
+
transparent: true,
|
|
31
|
+
style: {
|
|
32
|
+
borderRadius: 0,
|
|
33
|
+
padding: 0,
|
|
34
|
+
borderLeftWidth: 1,
|
|
35
|
+
borderColor: Colors.borders.light,
|
|
36
|
+
flexGrow: 1,
|
|
37
|
+
marginLeft: 6,
|
|
38
|
+
paddingLeft: 6,
|
|
39
|
+
minWidth: 75
|
|
40
|
+
},
|
|
41
|
+
onPress: () => setExpanded(!expanded)
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
43
|
+
theme: "h1",
|
|
44
|
+
style: {
|
|
45
|
+
maxWidth: width * 0.55
|
|
46
|
+
}
|
|
47
|
+
}, squares_competition.sq_comp_name), /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
theme: "light",
|
|
49
|
+
style: {
|
|
50
|
+
marginTop: 3
|
|
51
|
+
},
|
|
52
|
+
color: Colors.text.action
|
|
53
|
+
}, "See My Squares")), /*#__PURE__*/React.createElement(View, {
|
|
54
|
+
style: {
|
|
55
|
+
margin: 5,
|
|
56
|
+
minWidth: 40,
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
alignItems: 'center'
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
61
|
+
theme: "h1"
|
|
62
|
+
}, cl, 0 .toFixed(2)), /*#__PURE__*/React.createElement(Text, {
|
|
63
|
+
theme: "light"
|
|
64
|
+
}, "Risk"))), expanded ? /*#__PURE__*/React.createElement(View, {
|
|
65
|
+
transparent: true,
|
|
66
|
+
style: {
|
|
67
|
+
padding: 10
|
|
68
|
+
}
|
|
69
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
70
|
+
data: [],
|
|
71
|
+
renderItem: renderSquares,
|
|
72
|
+
key: `square_${squares_competition.sq_comp_id}_list`
|
|
73
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
74
|
+
};
|
|
75
|
+
export default SquaresRow;
|
|
76
|
+
//# sourceMappingURL=SquaresRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Button","Text","View","useColors","Icons","FlatList","SquaresRow","market_type","squares_competition","width","Colors","expanded","setExpanded","cl","renderSquares","data","console","log","item","createElement","type","style","padding","borderBottomWidth","borderColor","borders","light","flexWrap","SquaresIcon","size","color","text","h1","transparent","borderRadius","borderLeftWidth","flexGrow","marginLeft","paddingLeft","minWidth","onPress","theme","maxWidth","sq_comp_name","marginTop","action","margin","justifyContent","alignItems","toFixed","renderItem","key","sq_comp_id","Fragment"],"sourceRoot":"../../../../src","sources":["MyAction/components/SquaresRow.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,MAAM,EAAEC,IAAI,EAAEC,IAAI,QAAQ,yBAAyB;AAE5D,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,QAAQ,QAAQ,cAAc;AAQvC,MAAMC,UAAU,GAAGA,CAAC;EAAEC,WAAW;EAAEC,mBAAmB;EAAEC;AAAsB,CAAC,KAAK;EAChF,MAAMC,MAAM,GAAGP,SAAS,CAAC,CAAC;EAC1B,MAAM,CAAEQ,QAAQ,EAAEC,WAAW,CAAE,GAAGb,QAAQ,CAAC,KAAK,CAAC;EACjD,MAAMc,EAAE,GAAGN,WAAW,IAAI,WAAW,GAAG,GAAG,GAAG,GAAG;EAEjD,MAAMO,aAAa,GAAIC,IAA2C,IAAK;IACnEC,OAAO,CAACC,GAAG,CAACF,IAAI,CAACG,IAAI,CAAC;IACtB,oBACIpB,KAAA,CAAAqB,aAAA,CAACjB,IAAI,qBACDJ,KAAA,CAAAqB,aAAA,CAAClB,IAAI,QAAC,QAAY,CAChB,CAAC;EAEf,CAAC;EAED,oBACIH,KAAA,CAAAqB,aAAA,CAACjB,IAAI,qBACDJ,KAAA,CAAAqB,aAAA,CAACjB,IAAI;IAACkB,IAAI,EAAC,KAAK;IAACC,KAAK,EAAE;MAAEC,OAAO,EAAC,EAAE;MAAEC,iBAAiB,EAAC,CAAC;MAAEC,WAAW,EAACd,MAAM,CAACe,OAAO,CAACC,KAAK;MAAEC,QAAQ,EAAC;IAAO;EAAE,gBAC3G7B,KAAA,CAAAqB,aAAA,CAACf,KAAK,CAACwB,WAAW;IAACC,IAAI,EAAE,EAAG;IAAC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KAAA,CAAAqB,aAAA,CAACjB,IAAI;IAAC+B,WAAW;IAACZ,KAAK,EAAE;MAAEC,OAAO,EAAC;IAAG;EAAE,gBACpCxB,KAAA,CAAAqB,aAAA,CAACd,QAAQ;IACLU,IAAI,EAAE,EAAG;IACTmC,UAAU,EAAEpC,aAAc;IAC1BqC,GAAG,EAAE,UAAU3C,mBAAmB,CAAC4C,UAAU;EAAQ,CACpD,CACH,CAAC,gBACNtD,KAAA,CAAAqB,aAAA,CAAArB,KAAA,CAAAuD,QAAA,MAAI,CACH,CAAC;AAEf,CAAC;AAED,eAAe/C,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Action Components
|
|
3
|
+
* This is responsible for viewing all of your action in one spot
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import { Text, View } from "../Components/Themed";
|
|
8
|
+
import { FlatList } from 'react-native';
|
|
9
|
+
import { MyActionApi, MyActionHelpers } from './api';
|
|
10
|
+
//import { useColors } from '../constants/useColors';
|
|
11
|
+
import ContestStatRow from './components/ContestStatRow';
|
|
12
|
+
import ParlayRow from './components/ParlayRow';
|
|
13
|
+
import FlashRow from './components/FlashRow';
|
|
14
|
+
import SquaresRow from './components/SquaresRow';
|
|
15
|
+
import CompetitionRow from './components/CompetitionRow';
|
|
16
|
+
import BracketRow from './components/BracketRow';
|
|
17
|
+
const sections = ['header', 'action'];
|
|
18
|
+
const MyAction = ({
|
|
19
|
+
me,
|
|
20
|
+
market_type
|
|
21
|
+
}) => {
|
|
22
|
+
//const Colors = useColors();
|
|
23
|
+
const [size, setSize] = useState({
|
|
24
|
+
width: 0,
|
|
25
|
+
height: 0
|
|
26
|
+
});
|
|
27
|
+
const [contest_state, setContestState] = useState({
|
|
28
|
+
loading: false,
|
|
29
|
+
events: [],
|
|
30
|
+
matches: [],
|
|
31
|
+
leagues: [],
|
|
32
|
+
tournaments: [],
|
|
33
|
+
athletes: [],
|
|
34
|
+
teams: []
|
|
35
|
+
});
|
|
36
|
+
const {
|
|
37
|
+
events,
|
|
38
|
+
tournaments,
|
|
39
|
+
matches,
|
|
40
|
+
teams,
|
|
41
|
+
athletes,
|
|
42
|
+
leagues
|
|
43
|
+
} = contest_state;
|
|
44
|
+
const [engagement_state, setEngagementState] = useState({
|
|
45
|
+
loading: false,
|
|
46
|
+
competitions: [],
|
|
47
|
+
competition_players: [],
|
|
48
|
+
competition_result_types: [],
|
|
49
|
+
competition_results: [],
|
|
50
|
+
competition_records: [],
|
|
51
|
+
competition_types: [],
|
|
52
|
+
squares_competitions: [],
|
|
53
|
+
bracket_competitions: []
|
|
54
|
+
});
|
|
55
|
+
const {
|
|
56
|
+
competition_players,
|
|
57
|
+
competition_records,
|
|
58
|
+
competition_result_types,
|
|
59
|
+
competition_results,
|
|
60
|
+
competition_types,
|
|
61
|
+
competitions,
|
|
62
|
+
squares_competitions,
|
|
63
|
+
bracket_competitions
|
|
64
|
+
} = engagement_state;
|
|
65
|
+
const [active_flash_state, setActiveFlashState] = useState({
|
|
66
|
+
loading: false,
|
|
67
|
+
poll_options: [],
|
|
68
|
+
poll_responses: [],
|
|
69
|
+
polls: []
|
|
70
|
+
});
|
|
71
|
+
const {
|
|
72
|
+
polls,
|
|
73
|
+
poll_options,
|
|
74
|
+
poll_responses
|
|
75
|
+
} = active_flash_state;
|
|
76
|
+
const [active_order_state, setActiveOrderState] = useState({
|
|
77
|
+
loading: false,
|
|
78
|
+
orders: [],
|
|
79
|
+
parlays: [],
|
|
80
|
+
parlay_positions: [],
|
|
81
|
+
parlay_orders: []
|
|
82
|
+
});
|
|
83
|
+
const {
|
|
84
|
+
orders,
|
|
85
|
+
parlays,
|
|
86
|
+
parlay_orders,
|
|
87
|
+
parlay_positions
|
|
88
|
+
} = active_order_state;
|
|
89
|
+
const action_list = MyActionHelpers.sortAction(orders, parlays, parlay_orders, polls, competitions, squares_competitions, bracket_competitions);
|
|
90
|
+
//const stats = MyActionHelpers.getActionStats(orders, parlays, parlay_positions, competitions, squares_competitions, bracket_competitions)
|
|
91
|
+
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
if (!me) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
MyActionApi.setEnvironment();
|
|
97
|
+
getActiveOrderData();
|
|
98
|
+
getActiveFlashData();
|
|
99
|
+
getActiveEngagements();
|
|
100
|
+
}, [me]);
|
|
101
|
+
const getActiveEngagements = async () => {
|
|
102
|
+
setEngagementState({
|
|
103
|
+
...engagement_state,
|
|
104
|
+
loading: true
|
|
105
|
+
});
|
|
106
|
+
const options = await MyActionApi.EngagementApi.getCompetitionOptions();
|
|
107
|
+
const c_resp = await MyActionApi.EngagementApi.getMyActiveCompetitions();
|
|
108
|
+
const s_resp = await MyActionApi.EngagementApi.getMyActiveSquaresCompetitions();
|
|
109
|
+
const b_resp = await MyActionApi.EngagementApi.getMyActiveBracketCompetitions();
|
|
110
|
+
setEngagementState({
|
|
111
|
+
...engagement_state,
|
|
112
|
+
loading: false,
|
|
113
|
+
competition_types: options.competition_types,
|
|
114
|
+
competition_result_types: options.competition_result_types,
|
|
115
|
+
competitions: c_resp.competitions,
|
|
116
|
+
competition_players: c_resp.competition_players,
|
|
117
|
+
competition_records: c_resp.competition_records,
|
|
118
|
+
competition_results: c_resp.competition_results,
|
|
119
|
+
squares_competitions: s_resp.squares_competitions,
|
|
120
|
+
bracket_competitions: b_resp.bracket_competitions
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
const getActiveFlashData = async () => {
|
|
124
|
+
setActiveFlashState({
|
|
125
|
+
...active_flash_state,
|
|
126
|
+
loading: true
|
|
127
|
+
});
|
|
128
|
+
const sfa = await MyActionApi.FlashApi.getMyFlashAction();
|
|
129
|
+
setActiveFlashState({
|
|
130
|
+
...active_flash_state,
|
|
131
|
+
polls: sfa.polls,
|
|
132
|
+
poll_responses: sfa.poll_responses,
|
|
133
|
+
poll_options: sfa.poll_options,
|
|
134
|
+
loading: false
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
const getActiveOrderData = async () => {
|
|
138
|
+
setActiveOrderState({
|
|
139
|
+
...active_order_state,
|
|
140
|
+
loading: true
|
|
141
|
+
});
|
|
142
|
+
const soa = await MyActionApi.OrderApi.getMyAction();
|
|
143
|
+
setActiveOrderState({
|
|
144
|
+
...active_order_state,
|
|
145
|
+
orders: soa.orders,
|
|
146
|
+
parlays: soa.parlays,
|
|
147
|
+
parlay_orders: soa.parlay_orders,
|
|
148
|
+
parlay_positions: soa.parlay_positions,
|
|
149
|
+
loading: false
|
|
150
|
+
});
|
|
151
|
+
getContestData(soa.orders.concat(soa.parlay_orders));
|
|
152
|
+
};
|
|
153
|
+
const getContestData = async orders => {
|
|
154
|
+
setContestState({
|
|
155
|
+
...contest_state,
|
|
156
|
+
loading: true
|
|
157
|
+
});
|
|
158
|
+
const {
|
|
159
|
+
event_ids,
|
|
160
|
+
tournament_ids,
|
|
161
|
+
match_ids,
|
|
162
|
+
athlete_ids,
|
|
163
|
+
team_ids
|
|
164
|
+
} = MyActionHelpers.getContestsFromOrders(orders);
|
|
165
|
+
const s_contests = await MyActionHelpers.getContestsByIds(event_ids, tournament_ids, match_ids, athlete_ids, team_ids);
|
|
166
|
+
const s_leagues = await MyActionApi.ContestApi.getLeagues();
|
|
167
|
+
setContestState({
|
|
168
|
+
...contest_state,
|
|
169
|
+
leagues: s_leagues,
|
|
170
|
+
events: s_contests.events,
|
|
171
|
+
tournaments: s_contests.tournaments,
|
|
172
|
+
matches: s_contests.matches,
|
|
173
|
+
athletes: s_contests.athletes,
|
|
174
|
+
teams: s_contests.teams,
|
|
175
|
+
loading: false
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
const renderAction = data => {
|
|
179
|
+
switch (data.item.type) {
|
|
180
|
+
case 'contest':
|
|
181
|
+
if (!data.item.contest_type) {
|
|
182
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
183
|
+
}
|
|
184
|
+
const event = events.find(e => data.item.contest_type == 'team' && e.event_id == data.item.id);
|
|
185
|
+
const tournament = tournaments.find(t => data.item.contest_type == 'tournament' && t.tournament_id == data.item.id);
|
|
186
|
+
const match = matches.find(m => data.item.contest_type == 'match' && m.match_id == data.item.id);
|
|
187
|
+
const {
|
|
188
|
+
contest_title,
|
|
189
|
+
scheduled_datetime
|
|
190
|
+
} = MyActionHelpers.getContestDetails(data.item.contest_type, event, tournament, match);
|
|
191
|
+
return /*#__PURE__*/React.createElement(ContestStatRow, {
|
|
192
|
+
leagues: leagues,
|
|
193
|
+
events: events,
|
|
194
|
+
tournaments: tournaments,
|
|
195
|
+
matches: matches,
|
|
196
|
+
teams: teams,
|
|
197
|
+
athletes: athletes,
|
|
198
|
+
market_type: market_type,
|
|
199
|
+
width: size.width,
|
|
200
|
+
contest_label: contest_title,
|
|
201
|
+
time_detail: scheduled_datetime.format('MMM DD YYYY @ hh:mm a'),
|
|
202
|
+
orders: data.item.orders
|
|
203
|
+
});
|
|
204
|
+
case 'parlay':
|
|
205
|
+
const parlay = parlays.find(p => p.parlay_id == data.item.id);
|
|
206
|
+
const p_orders = parlay_orders.filter(po => po.parlay_id == data.item.id);
|
|
207
|
+
const p_positions = parlay_positions.filter(pp => pp.parlay_id == data.item.id);
|
|
208
|
+
if (!parlay) {
|
|
209
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
210
|
+
}
|
|
211
|
+
return /*#__PURE__*/React.createElement(ParlayRow, {
|
|
212
|
+
parlay: parlay,
|
|
213
|
+
leagues: leagues,
|
|
214
|
+
events: events,
|
|
215
|
+
tournaments: tournaments,
|
|
216
|
+
matches: matches,
|
|
217
|
+
athletes: athletes,
|
|
218
|
+
teams: teams,
|
|
219
|
+
parlay_orders: p_orders,
|
|
220
|
+
parlay_positions: p_positions,
|
|
221
|
+
market_type: market_type,
|
|
222
|
+
width: size.width
|
|
223
|
+
});
|
|
224
|
+
case 'flash':
|
|
225
|
+
const poll = polls.find(p => p.poll_id == data.item.id);
|
|
226
|
+
if (!poll) {
|
|
227
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
228
|
+
}
|
|
229
|
+
let responses = poll_responses.filter(pr => pr.poll_id == data.item.id);
|
|
230
|
+
let options = poll_options.filter(po => po.poll_id == data.item.id);
|
|
231
|
+
return /*#__PURE__*/React.createElement(FlashRow, {
|
|
232
|
+
poll: poll,
|
|
233
|
+
poll_options: options,
|
|
234
|
+
poll_responses: responses,
|
|
235
|
+
market_type: market_type,
|
|
236
|
+
width: size.width
|
|
237
|
+
});
|
|
238
|
+
case 'squares':
|
|
239
|
+
const squares_competition = squares_competitions.find(sc => sc.sq_comp_id == data.item.id);
|
|
240
|
+
if (!squares_competition) {
|
|
241
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
242
|
+
}
|
|
243
|
+
return /*#__PURE__*/React.createElement(SquaresRow, {
|
|
244
|
+
squares_competition: squares_competition,
|
|
245
|
+
market_type: market_type,
|
|
246
|
+
width: size.width
|
|
247
|
+
});
|
|
248
|
+
case 'competition':
|
|
249
|
+
const competition = competitions.find(c => c.competition_id == data.item.id);
|
|
250
|
+
if (!competition) {
|
|
251
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
252
|
+
}
|
|
253
|
+
const competition_type = competition_types.find(ct => ct.competition_type_id == competition.competition_type_id);
|
|
254
|
+
const competition_result_type = competition_result_types.find(crt => crt.competition_result_type_id == competition.competition_result_type_id);
|
|
255
|
+
const competition_player = competition_players.find(cp => cp.competition_id == data.item.id);
|
|
256
|
+
const competition_record = competition_records.find(cr => cr.competition_id == data.item.id);
|
|
257
|
+
const competition_result = competition_results.find(cr => cr.competition_id == data.item.id);
|
|
258
|
+
if (!competition_result_type || !competition_type || !competition_player || !competition_record || !competition_result) {
|
|
259
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
260
|
+
}
|
|
261
|
+
return /*#__PURE__*/React.createElement(CompetitionRow, {
|
|
262
|
+
competition: competition,
|
|
263
|
+
competition_player: competition_player,
|
|
264
|
+
competition_record: competition_record,
|
|
265
|
+
competition_result: competition_result,
|
|
266
|
+
competition_result_type: competition_result_type,
|
|
267
|
+
competition_type: competition_type,
|
|
268
|
+
market_type: market_type,
|
|
269
|
+
width: size.width
|
|
270
|
+
});
|
|
271
|
+
case 'bracket':
|
|
272
|
+
const bracket_competition = bracket_competitions.find(bc => bc.bracket_competition_id == data.item.id);
|
|
273
|
+
if (!bracket_competition) {
|
|
274
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
275
|
+
}
|
|
276
|
+
return /*#__PURE__*/React.createElement(BracketRow, {
|
|
277
|
+
bracket_competition: bracket_competition,
|
|
278
|
+
width: size.width,
|
|
279
|
+
market_type: market_type
|
|
280
|
+
});
|
|
281
|
+
default:
|
|
282
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
const renderSections = data => {
|
|
286
|
+
switch (data.item) {
|
|
287
|
+
case 'header':
|
|
288
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
289
|
+
case 'action':
|
|
290
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
291
|
+
type: "header",
|
|
292
|
+
style: {
|
|
293
|
+
flexDirection: 'row',
|
|
294
|
+
alignItems: 'center',
|
|
295
|
+
padding: 10,
|
|
296
|
+
borderTopRightRadius: 8,
|
|
297
|
+
borderTopLeftRadius: 8
|
|
298
|
+
}
|
|
299
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
300
|
+
transparent: true,
|
|
301
|
+
style: {
|
|
302
|
+
flex: 1
|
|
303
|
+
}
|
|
304
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
305
|
+
theme: "h1"
|
|
306
|
+
}, "My Action"), /*#__PURE__*/React.createElement(Text, {
|
|
307
|
+
theme: "description",
|
|
308
|
+
style: {
|
|
309
|
+
marginTop: 3
|
|
310
|
+
}
|
|
311
|
+
}, "Action List"))), /*#__PURE__*/React.createElement(FlatList, {
|
|
312
|
+
data: action_list,
|
|
313
|
+
key: 'action_list',
|
|
314
|
+
keyExtractor: item => item.id.toString(),
|
|
315
|
+
renderItem: renderAction
|
|
316
|
+
}));
|
|
317
|
+
default:
|
|
318
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
322
|
+
transparent: true,
|
|
323
|
+
style: {
|
|
324
|
+
flex: 1
|
|
325
|
+
},
|
|
326
|
+
onLayout: ev => {
|
|
327
|
+
const {
|
|
328
|
+
width,
|
|
329
|
+
height
|
|
330
|
+
} = ev.nativeEvent.layout;
|
|
331
|
+
setSize({
|
|
332
|
+
width,
|
|
333
|
+
height
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
337
|
+
data: sections,
|
|
338
|
+
key: 'action_sections',
|
|
339
|
+
keyExtractor: item => item,
|
|
340
|
+
renderItem: renderSections
|
|
341
|
+
}));
|
|
342
|
+
};
|
|
343
|
+
export default MyAction;
|
|
344
|
+
//# sourceMappingURL=index.js.map
|