be-components 5.8.1 → 5.8.3
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/Campaign/api/index.js +124 -0
- package/lib/commonjs/Campaign/api/index.js.map +1 -1
- package/lib/commonjs/Campaign/components/ActionList.js +46 -9
- package/lib/commonjs/Campaign/components/ActionList.js.map +1 -1
- package/lib/commonjs/Campaign/components/BetAlert.js +22 -10
- package/lib/commonjs/Campaign/components/BetAlert.js.map +1 -1
- package/lib/commonjs/Campaign/components/CampaignAnalytics.js +142 -11
- package/lib/commonjs/Campaign/components/CampaignAnalytics.js.map +1 -1
- package/lib/commonjs/Campaign/components/NewPlayerAlert.js +139 -0
- package/lib/commonjs/Campaign/components/NewPlayerAlert.js.map +1 -0
- package/lib/commonjs/Campaign/components/ParticipantCard.js +5 -0
- package/lib/commonjs/Campaign/components/ParticipantCard.js.map +1 -1
- package/lib/commonjs/Campaign/components/ParticipantsList.js +0 -1
- package/lib/commonjs/Campaign/components/ParticipantsList.js.map +1 -1
- package/lib/commonjs/Campaign/index.js +564 -222
- package/lib/commonjs/Campaign/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/api/index.js +21 -0
- package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
- package/lib/commonjs/Ticker/index.js +175 -31
- package/lib/commonjs/Ticker/index.js.map +1 -1
- package/lib/module/Campaign/api/index.js +124 -0
- package/lib/module/Campaign/api/index.js.map +1 -1
- package/lib/module/Campaign/components/ActionList.js +46 -9
- package/lib/module/Campaign/components/ActionList.js.map +1 -1
- package/lib/module/Campaign/components/BetAlert.js +22 -10
- package/lib/module/Campaign/components/BetAlert.js.map +1 -1
- package/lib/module/Campaign/components/CampaignAnalytics.js +144 -13
- package/lib/module/Campaign/components/CampaignAnalytics.js.map +1 -1
- package/lib/module/Campaign/components/NewPlayerAlert.js +132 -0
- package/lib/module/Campaign/components/NewPlayerAlert.js.map +1 -0
- package/lib/module/Campaign/components/ParticipantCard.js +5 -0
- package/lib/module/Campaign/components/ParticipantCard.js.map +1 -1
- package/lib/module/Campaign/components/ParticipantsList.js +0 -1
- package/lib/module/Campaign/components/ParticipantsList.js.map +1 -1
- package/lib/module/Campaign/index.js +564 -222
- package/lib/module/Campaign/index.js.map +1 -1
- package/lib/module/MarketComponents/api/index.js +21 -0
- package/lib/module/MarketComponents/api/index.js.map +1 -1
- package/lib/module/Ticker/index.js +178 -34
- package/lib/module/Ticker/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts +11 -0
- package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/components/ActionList.d.ts +4 -1
- package/lib/typescript/lib/commonjs/Campaign/components/ActionList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/components/BetAlert.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Campaign/components/BetAlert.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/components/CampaignAnalytics.d.ts +4 -2
- package/lib/typescript/lib/commonjs/Campaign/components/CampaignAnalytics.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/components/NewPlayerAlert.d.ts +10 -0
- package/lib/typescript/lib/commonjs/Campaign/components/NewPlayerAlert.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Campaign/components/ParticipantCard.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Campaign/components/ParticipantCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/components/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/index.d.ts +8 -5
- package/lib/typescript/lib/commonjs/Campaign/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Ticker/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Ticker/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/api/index.d.ts +11 -0
- package/lib/typescript/lib/module/Campaign/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/ActionList.d.ts +4 -1
- package/lib/typescript/lib/module/Campaign/components/ActionList.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/BetAlert.d.ts +3 -1
- package/lib/typescript/lib/module/Campaign/components/BetAlert.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/CampaignAnalytics.d.ts +4 -2
- package/lib/typescript/lib/module/Campaign/components/CampaignAnalytics.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/NewPlayerAlert.d.ts +10 -0
- package/lib/typescript/lib/module/Campaign/components/NewPlayerAlert.d.ts.map +1 -0
- package/lib/typescript/lib/module/Campaign/components/ParticipantCard.d.ts +3 -1
- package/lib/typescript/lib/module/Campaign/components/ParticipantCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/index.d.ts +8 -5
- package/lib/typescript/lib/module/Campaign/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Ticker/index.d.ts +2 -1
- package/lib/typescript/lib/module/Ticker/index.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/api/index.d.ts +21 -6
- package/lib/typescript/src/Campaign/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/components/ActionList.d.ts +5 -2
- package/lib/typescript/src/Campaign/components/ActionList.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/components/BetAlert.d.ts +4 -2
- package/lib/typescript/src/Campaign/components/BetAlert.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/components/CampaignAnalytics.d.ts +6 -3
- package/lib/typescript/src/Campaign/components/CampaignAnalytics.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/components/NewPlayerAlert.d.ts +12 -0
- package/lib/typescript/src/Campaign/components/NewPlayerAlert.d.ts.map +1 -0
- package/lib/typescript/src/Campaign/components/ParticipantCard.d.ts +4 -2
- package/lib/typescript/src/Campaign/components/ParticipantCard.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/index.d.ts +7 -4
- package/lib/typescript/src/Campaign/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/api/index.d.ts +3 -2
- package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Ticker/index.d.ts +2 -1
- package/lib/typescript/src/Ticker/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Campaign/api/index.ts +86 -4
- package/src/Campaign/components/ActionList.tsx +38 -13
- package/src/Campaign/components/BetAlert.tsx +15 -6
- package/src/Campaign/components/CampaignAnalytics.tsx +76 -13
- package/src/Campaign/components/NewPlayerAlert.tsx +81 -0
- package/src/Campaign/components/ParticipantCard.tsx +7 -2
- package/src/Campaign/components/ParticipantsList.tsx +1 -1
- package/src/Campaign/index.tsx +421 -188
- package/src/MarketComponents/api/index.ts +16 -2
- package/src/Ticker/index.tsx +94 -35
- package/src/types.d.ts +3 -0
|
@@ -362,7 +362,21 @@ const MarketComponentHelpers = {
|
|
|
362
362
|
if(match.time_detail == 'scheduled'){ return moment(match.scheduled_datetime).format('MMM DD hh:mm a') }
|
|
363
363
|
return match.time_detail
|
|
364
364
|
},
|
|
365
|
-
|
|
365
|
+
getOrderTitle: (order:OrderProps|BestAvailableOrderProps, market:MarketProps, event?:EventProps, tournament?:TournamentProps, match?:MatchProps, athlete?:AthleteProps, team?:TeamProps) => {
|
|
366
|
+
switch(order.event_type){
|
|
367
|
+
case 'team':
|
|
368
|
+
if(!event){ return undefined }
|
|
369
|
+
return MarketComponentHelpers.getOrderTitleForTeamEvent(order, market, event, athlete)
|
|
370
|
+
case 'tournament':
|
|
371
|
+
if(!tournament){return undefined }
|
|
372
|
+
return MarketComponentHelpers.getOrderTitleForTournament(order, market, tournament, athlete, team);
|
|
373
|
+
case 'match':
|
|
374
|
+
if(!match){ return undefined }
|
|
375
|
+
return MarketComponentHelpers.getOrderTitleForMatch(order, market, match, athlete, team);
|
|
376
|
+
default: return undefined
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
getOrderTitleForTeamEvent : (order:OrderProps|BestAvailableOrderProps, market:MarketProps, event:EventProps, athlete?:AthleteProps, exotic?:any):string | undefined => {
|
|
366
380
|
let market_side = market.side_options.find(o => o.side == order.side)
|
|
367
381
|
if(!market_side){ return undefined }
|
|
368
382
|
var re = /({.*?})/;
|
|
@@ -410,7 +424,7 @@ const MarketComponentHelpers = {
|
|
|
410
424
|
})
|
|
411
425
|
return new_title
|
|
412
426
|
},
|
|
413
|
-
getOrderTitleForMatch : (order:OrderProps, market:MarketProps, match:MatchProps, athlete?:AthleteProps, team?:TeamProps):string | undefined => {
|
|
427
|
+
getOrderTitleForMatch : (order:OrderProps|BestAvailableOrderProps, market:MarketProps, match:MatchProps, athlete?:AthleteProps, team?:TeamProps):string | undefined => {
|
|
414
428
|
if(!match){ return undefined }
|
|
415
429
|
let market_side = market.side_options.find(o => o.side == order.side)
|
|
416
430
|
if(!market_side){ return order.side }
|
package/src/Ticker/index.tsx
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Text, View } from "../Components/Themed"
|
|
2
|
+
import { Button, Text, View } from "../Components/Themed"
|
|
3
3
|
import type { AthleteProps, EventProps, ExternalPriceProps, LeagueProps, MarketProps, OrderProps, TeamProps, TournamentProps, TradeProps } from '../types';
|
|
4
|
-
import { MarketComponentApi } from '../MarketComponents/api';
|
|
5
|
-
import {
|
|
4
|
+
import { MarketComponentApi, MarketComponentHelpers } from '../MarketComponents/api';
|
|
5
|
+
import { ActivityIndicator, Image } from 'react-native';
|
|
6
6
|
import moment from 'moment-mini';
|
|
7
7
|
import { useColors } from '../constants/useColors';
|
|
8
8
|
import { FINALIZED_STATUSES } from '../Competition/api';
|
|
9
9
|
import TradeText from './components/TradeText';
|
|
10
10
|
import SocketManager from '../Socket';
|
|
11
11
|
import { AthleteImage } from '../Components/Jerseys';
|
|
12
|
+
import { MarketButtonHelpers } from '../MarketComponents/components/MarketButton/api';
|
|
13
|
+
import { Icons } from '../Components';
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
type TickerProps = {
|
|
15
17
|
league_ids:string[],
|
|
16
18
|
color_mode?:'light'|'dark',
|
|
17
19
|
distinct_id?:string,
|
|
18
|
-
onOrders?:(orders:OrderProps[]) => void
|
|
20
|
+
onOrders?:(orders:OrderProps[]) => void,
|
|
21
|
+
onCreateOrder?:(order:OrderProps) => void
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
const MIN_SIZE =
|
|
24
|
+
const MIN_SIZE = 365
|
|
22
25
|
const MARGIN = 6
|
|
23
26
|
|
|
24
|
-
const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) => {
|
|
27
|
+
const Ticker = ({ league_ids, color_mode, distinct_id, onOrders, onCreateOrder }:TickerProps) => {
|
|
25
28
|
const Colors = useColors({ mode: color_mode });
|
|
26
29
|
const [ embed_size, setEmbedSize ] = useState({ height:0, width:0 });
|
|
27
30
|
const [ needs_reload, setNeedsReload ] = useState(false);
|
|
@@ -32,8 +35,8 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
32
35
|
markets:MarketProps[],
|
|
33
36
|
events:EventProps[],
|
|
34
37
|
athletes:AthleteProps[],
|
|
35
|
-
tournaments:TournamentProps[],
|
|
36
38
|
teams:TeamProps[],
|
|
39
|
+
tournaments:TournamentProps[],
|
|
37
40
|
leagues:LeagueProps[],
|
|
38
41
|
trades:TradeProps[],
|
|
39
42
|
animate:boolean,
|
|
@@ -50,7 +53,7 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
50
53
|
leagues: [],
|
|
51
54
|
external_prices: []
|
|
52
55
|
});
|
|
53
|
-
const { trades, leagues, events, tournaments, athletes, animate, markets } = ticker_data;
|
|
56
|
+
const { loading, trades, leagues, events, tournaments, athletes, teams, animate, markets } = ticker_data;
|
|
54
57
|
let sorted_events = events.sort((a,b) => {
|
|
55
58
|
return moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix() || parseInt(a.event_id) - parseInt(b.event_id)
|
|
56
59
|
});
|
|
@@ -64,10 +67,14 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
64
67
|
//Check how many we can do min size
|
|
65
68
|
let number_to_render = Math.floor(width / min_size)
|
|
66
69
|
let width_no_margin = width / number_to_render
|
|
67
|
-
return width_no_margin - (margin*2)
|
|
70
|
+
return { tick_width: width_no_margin - (margin*2), num_columns:number_to_render }
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
const tick_width = calcWidth(embed_size.width, MIN_SIZE, MARGIN);
|
|
73
|
+
const { tick_width, num_columns } = calcWidth(embed_size.width, MIN_SIZE, MARGIN);
|
|
74
|
+
let column_headers:{ number:number }[] = []
|
|
75
|
+
for (let i = 0; i < num_columns; i++) {
|
|
76
|
+
column_headers.push({number: i+1});
|
|
77
|
+
}
|
|
71
78
|
useEffect(() => {
|
|
72
79
|
startUp();
|
|
73
80
|
},[]);
|
|
@@ -105,12 +112,12 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
const getData = async() => {
|
|
115
|
+
setTickerData({ ...ticker_data, loading: true })
|
|
108
116
|
const lgs = await MarketComponentApi.getLeagues();
|
|
109
117
|
const mks = await MarketComponentApi.getMarkets();
|
|
110
118
|
let evs = await MarketComponentApi.getActiveEvents();
|
|
111
119
|
let tns = await MarketComponentApi.getActiveTournaments();
|
|
112
120
|
if(league_ids.length > 0){
|
|
113
|
-
console.log(tns.map(tn => tn.league_id))
|
|
114
121
|
evs = evs.filter(e => league_ids.map(id => id.toString()).includes(e.league_id.toString()));
|
|
115
122
|
tns = tns.filter(t => league_ids.map(id => id.toString()).includes(t.league_id.toString()));
|
|
116
123
|
}
|
|
@@ -128,6 +135,7 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
128
135
|
setTickerData({
|
|
129
136
|
...ticker_data,
|
|
130
137
|
events: evs,
|
|
138
|
+
loading:false,
|
|
131
139
|
animate:false,
|
|
132
140
|
athletes: aths,
|
|
133
141
|
teams: tms,
|
|
@@ -139,25 +147,51 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
139
147
|
}
|
|
140
148
|
|
|
141
149
|
|
|
142
|
-
const renderTrades = (data: { item:MarketProps, index:number,
|
|
143
|
-
|
|
150
|
+
const renderTrades = (data: { item:MarketProps, index:number, contest_type:string, contest_id:string, is_live:boolean, side_type?:string, side_id?:string }) => {
|
|
151
|
+
let ev_trades = trades.filter(t => t.event_type == data.contest_type && t.event_id == data.contest_id && t.market_id == data.item.market_id);
|
|
152
|
+
if(data.side_type){ ev_trades = ev_trades.filter(t => t.side_type == data.side_type && t.side_id == data.side_id) }
|
|
144
153
|
const trade_side_trade = ev_trades.find(t => t.side == data.item.trade_side);
|
|
145
|
-
if(!trade_side_trade){ return <></> }
|
|
154
|
+
//if(!trade_side_trade){ return <></> }
|
|
155
|
+
|
|
146
156
|
return (
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
157
|
+
<Button float={onCreateOrder?true : false} disabled={!onCreateOrder} transparent style={{ padding:0, margin:2, borderWidth:0, width:60, justifyContent:'center', alignItems:'center'}} onPress={() => {
|
|
158
|
+
if(!trade_side_trade){ return }
|
|
159
|
+
if(!onCreateOrder){ return }
|
|
160
|
+
const order = MarketButtonHelpers.getOrderFromTrade(trade_side_trade);
|
|
161
|
+
const market = markets.find(mk => mk.market_id == trade_side_trade.market_id);
|
|
162
|
+
if(!market){ return }
|
|
163
|
+
const tournament = tournaments.find(t => t.tournament_id == order.event_id);
|
|
164
|
+
const event = events.find(e => e.event_id == order.event_id);
|
|
165
|
+
const athlete = athletes.find(a => a.athlete_id == order.side_id);
|
|
166
|
+
const team = teams.find(t => t.team_id == order.side_id);
|
|
167
|
+
//const match = [].find(m => m.mark)
|
|
168
|
+
let title = MarketComponentHelpers.getOrderTitle(order, market, event, tournament, undefined, athlete, team);
|
|
169
|
+
if(!title){ return }
|
|
170
|
+
return onCreateOrder({ ...order, title });
|
|
171
|
+
}}>
|
|
172
|
+
{trade_side_trade ?
|
|
173
|
+
<TradeText
|
|
174
|
+
market={data.item}
|
|
175
|
+
trade={trade_side_trade}
|
|
176
|
+
width={tick_width / 2.5 / 3}
|
|
177
|
+
animate={animate}
|
|
178
|
+
/>
|
|
179
|
+
:
|
|
180
|
+
<Icons.LockClosedIcon size={12} color={Colors.text.h1} />
|
|
181
|
+
}
|
|
182
|
+
</Button>
|
|
153
183
|
)
|
|
154
184
|
}
|
|
155
185
|
|
|
156
|
-
const
|
|
186
|
+
const renderAthletes = (data:{item:string, index:number, tournament:TournamentProps, league?:LeagueProps}) => {
|
|
157
187
|
const athlete = athletes.find(a => a.athlete_id == data.item);
|
|
158
188
|
if(!athlete){ return <></> }
|
|
189
|
+
let sup_markets = data.tournament.supported_markets ?? []
|
|
190
|
+
const supported_markets = markets.filter(pm => sup_markets.map(sm => sm.market_id.toString()).includes(pm.market_id.toString())).sort((a,b) => parseInt(a.market_id) - parseInt(b.market_id));
|
|
191
|
+
const is_live = moment().isAfter(moment(data.tournament.scheduled_datetime)) ? true : false
|
|
192
|
+
const is_closed = FINALIZED_STATUSES.includes(data.tournament.status) ? true : false
|
|
159
193
|
return (
|
|
160
|
-
<View style={{ flexDirection:'row', alignItems:'center', padding:5, borderBottomWidth:1, borderColor:Colors.borders.light }}>
|
|
194
|
+
<View key={data.item.toString()} style={{ width:tick_width-10, flexDirection:'row', alignItems:'center', margin:2, padding:5, borderBottomWidth:1, borderColor:is_closed?Colors.text.error:is_live?Colors.text.success:Colors.borders.light }}>
|
|
161
195
|
<View float style={{ padding:2, borderRadius:100 }}>
|
|
162
196
|
<AthleteImage
|
|
163
197
|
league={data.league}
|
|
@@ -165,10 +199,14 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
165
199
|
size={32}
|
|
166
200
|
/>
|
|
167
201
|
</View>
|
|
168
|
-
|
|
169
202
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
170
203
|
<Text theme='h1'>{athlete.first_name} {athlete.last_name}</Text>
|
|
171
204
|
</View>
|
|
205
|
+
<View style={{ flexDirection:'row' }}>
|
|
206
|
+
{supported_markets.map((sm, i) => {
|
|
207
|
+
return renderTrades({ item: sm, index:i, contest_type: 'tournament', contest_id:data.tournament.tournament_id, is_live, side_type:'athlete', side_id:data.item })
|
|
208
|
+
})}
|
|
209
|
+
</View>
|
|
172
210
|
</View>
|
|
173
211
|
)
|
|
174
212
|
}
|
|
@@ -176,18 +214,36 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
176
214
|
const renderTournaments = (data:{ item:TournamentProps, index:number }) => {
|
|
177
215
|
const league = leagues.find(l => l.league_id == data.item.league_id)
|
|
178
216
|
return (
|
|
179
|
-
<View key={data.item.tournament_id.toString()} style={{
|
|
180
|
-
<View>
|
|
181
|
-
<
|
|
217
|
+
<View key={data.item.tournament_id.toString()} style={{ width:embed_size.width }}>
|
|
218
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
219
|
+
<View transparent style={{flex:1}}>
|
|
220
|
+
<Text theme='h1'>{data.item.tournament_name}</Text>
|
|
221
|
+
<Text theme='description' style={{ marginTop:3 }}>{moment(data.item.scheduled_datetime).format('MMM D hh:mm a')}</Text>
|
|
222
|
+
</View>
|
|
223
|
+
</View>
|
|
224
|
+
<View style={{ flexDirection:'row', alignItems:'center', flexWrap:'wrap', paddingLeft:10, paddingRight:10 }}>
|
|
225
|
+
{column_headers.map(c => {
|
|
226
|
+
return (
|
|
227
|
+
<View key={c.toString()} style={{ width:tick_width - 10, flexDirection:'row', alignItems:'center', paddingTop:10 }}>
|
|
228
|
+
<View style={{ flex:1 }} />
|
|
229
|
+
{data.item.supported_markets.map(sm => {
|
|
230
|
+
const market = markets.find(md => md.market_id == sm.market_id)
|
|
231
|
+
if(!market){ return <></> }
|
|
232
|
+
return (
|
|
233
|
+
<View transparent style={{ margin:2, width:60 }}>
|
|
234
|
+
<Text theme='h2' textAlign='center'>{market.type}</Text>
|
|
235
|
+
</View>
|
|
236
|
+
)
|
|
237
|
+
})}
|
|
238
|
+
</View>
|
|
239
|
+
)
|
|
240
|
+
})}
|
|
182
241
|
</View>
|
|
183
242
|
{data.item.participant_type == 'athlete' ?
|
|
184
|
-
<View>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
keyExtractor={(item) => item.toString()}
|
|
189
|
-
renderItem={({ item ,index }) => renderAthletes({ item, index, tournament: data.item, league })}
|
|
190
|
-
/>
|
|
243
|
+
<View style={{ flexDirection:'row', flexWrap:'wrap', padding:10, paddingTop:0 }}>
|
|
244
|
+
{data.item.participants.map((item, index) => {
|
|
245
|
+
return renderAthletes({ item, index, tournament:data.item, league })
|
|
246
|
+
})}
|
|
191
247
|
</View>
|
|
192
248
|
:<></>}
|
|
193
249
|
</View>
|
|
@@ -214,7 +270,7 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
214
270
|
</View>
|
|
215
271
|
<View style={{ flexDirection:'row' }}>
|
|
216
272
|
{supported_markets.map((sm, i) => {
|
|
217
|
-
return renderTrades({ item: sm, index:i,
|
|
273
|
+
return renderTrades({ item: sm, index:i, contest_type: 'team', contest_id:data.item.event_id, is_live })
|
|
218
274
|
})}
|
|
219
275
|
</View>
|
|
220
276
|
</View>
|
|
@@ -232,7 +288,10 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
|
|
|
232
288
|
const { width, height } = ev.nativeEvent.layout;
|
|
233
289
|
setEmbedSize({ width, height });
|
|
234
290
|
}}>
|
|
235
|
-
|
|
291
|
+
{loading ?
|
|
292
|
+
<ActivityIndicator style={{ margin:20, alignSelf:'center' }} size='large' color={Colors.text.h1} />
|
|
293
|
+
:<></>}
|
|
294
|
+
<View style={{ flexDirection:'row' }}>
|
|
236
295
|
{sorted_tournaments.map((e,i) => {
|
|
237
296
|
return renderTournaments({ item:e, index:i })
|
|
238
297
|
})}
|
package/src/types.d.ts
CHANGED
|
@@ -697,6 +697,8 @@ export interface CampaignProps {
|
|
|
697
697
|
sponsors?:bigint[],
|
|
698
698
|
prize_description?:string,
|
|
699
699
|
raffle_options?:string[],
|
|
700
|
+
poll_campaign_ids?:string[],
|
|
701
|
+
competition_ids?:string[],
|
|
700
702
|
raffle_type?:string,
|
|
701
703
|
ads?:{
|
|
702
704
|
ad_type:string,
|
|
@@ -2294,6 +2296,7 @@ export interface OverallOrderAnalyticsProps {
|
|
|
2294
2296
|
losses:number,
|
|
2295
2297
|
draws:number
|
|
2296
2298
|
}
|
|
2299
|
+
export type NewOverallAnalytics = OverallOrderAnalyticsProps&{roi_pct:number, win_pct:number, earnings:number}
|
|
2297
2300
|
|
|
2298
2301
|
export interface OrderAnalyticsProps {
|
|
2299
2302
|
day:string,
|