be-components 2.4.8 → 2.5.0
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/Components/Jerseys.js +14 -4
- package/lib/commonjs/Components/Jerseys.js.map +1 -1
- package/lib/commonjs/LocationTracker/LocationStatus.js +1 -0
- package/lib/commonjs/LocationTracker/LocationStatus.js.map +1 -1
- package/lib/commonjs/MarketComponents/api/index.js +40 -0
- package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +231 -0
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +91 -3
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamTournamentMarket/index.js +202 -0
- package/lib/commonjs/MarketComponents/components/TeamTournamentMarket/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/TournamentMarket/api/index.js +109 -0
- package/lib/commonjs/MarketComponents/components/TournamentMarket/api/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js +380 -0
- package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/index.js +3 -1
- package/lib/commonjs/MarketComponents/index.js.map +1 -1
- package/lib/commonjs/MarketMaker/api/index.js +1146 -8
- package/lib/commonjs/MarketMaker/api/index.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/Contest.js +169 -23
- package/lib/commonjs/MarketMaker/components/Contest.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/ContestMarkets.js +662 -4
- package/lib/commonjs/MarketMaker/components/ContestMarkets.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/Dashboard.js +77 -12
- package/lib/commonjs/MarketMaker/components/Dashboard.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/FundActions.js +232 -0
- package/lib/commonjs/MarketMaker/components/FundActions.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/FundOwnershipList.js +94 -0
- package/lib/commonjs/MarketMaker/components/FundOwnershipList.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/FundSelector.js +99 -0
- package/lib/commonjs/MarketMaker/components/FundSelector.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/FundingRequestList.js +112 -0
- package/lib/commonjs/MarketMaker/components/FundingRequestList.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/ManageFundForm.js +122 -0
- package/lib/commonjs/MarketMaker/components/ManageFundForm.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/OrderForm.js +186 -0
- package/lib/commonjs/MarketMaker/components/OrderForm.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/SetMarketForm.js +449 -0
- package/lib/commonjs/MarketMaker/components/SetMarketForm.js.map +1 -0
- package/lib/commonjs/MarketMaker/components/WeightProgress.js +51 -0
- package/lib/commonjs/MarketMaker/components/WeightProgress.js.map +1 -0
- package/lib/commonjs/MarketMaker/index.js +399 -21
- package/lib/commonjs/MarketMaker/index.js.map +1 -1
- package/lib/commonjs/Socket/index.js +1 -1
- package/lib/commonjs/Socket/index.js.map +1 -1
- package/lib/module/Components/Jerseys.js +14 -4
- package/lib/module/Components/Jerseys.js.map +1 -1
- package/lib/module/LocationTracker/LocationStatus.js +1 -0
- package/lib/module/LocationTracker/LocationStatus.js.map +1 -1
- package/lib/module/MarketComponents/api/index.js +40 -0
- package/lib/module/MarketComponents/api/index.js.map +1 -1
- package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/MatchMarket/index.js +222 -0
- package/lib/module/MarketComponents/components/MatchMarket/index.js.map +1 -0
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +91 -3
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamTournamentMarket/index.js +193 -0
- package/lib/module/MarketComponents/components/TeamTournamentMarket/index.js.map +1 -0
- package/lib/module/MarketComponents/components/TournamentMarket/api/index.js +103 -0
- package/lib/module/MarketComponents/components/TournamentMarket/api/index.js.map +1 -0
- package/lib/module/MarketComponents/components/TournamentMarket/index.js +371 -0
- package/lib/module/MarketComponents/components/TournamentMarket/index.js.map +1 -0
- package/lib/module/MarketComponents/index.js +3 -1
- package/lib/module/MarketComponents/index.js.map +1 -1
- package/lib/module/MarketMaker/api/index.js +1146 -8
- package/lib/module/MarketMaker/api/index.js.map +1 -1
- package/lib/module/MarketMaker/components/Contest.js +168 -24
- package/lib/module/MarketMaker/components/Contest.js.map +1 -1
- package/lib/module/MarketMaker/components/ContestMarkets.js +663 -5
- package/lib/module/MarketMaker/components/ContestMarkets.js.map +1 -1
- package/lib/module/MarketMaker/components/Dashboard.js +76 -13
- package/lib/module/MarketMaker/components/Dashboard.js.map +1 -1
- package/lib/module/MarketMaker/components/FundActions.js +223 -0
- package/lib/module/MarketMaker/components/FundActions.js.map +1 -0
- package/lib/module/MarketMaker/components/FundOwnershipList.js +87 -0
- package/lib/module/MarketMaker/components/FundOwnershipList.js.map +1 -0
- package/lib/module/MarketMaker/components/FundSelector.js +92 -0
- package/lib/module/MarketMaker/components/FundSelector.js.map +1 -0
- package/lib/module/MarketMaker/components/FundingRequestList.js +105 -0
- package/lib/module/MarketMaker/components/FundingRequestList.js.map +1 -0
- package/lib/module/MarketMaker/components/ManageFundForm.js +113 -0
- package/lib/module/MarketMaker/components/ManageFundForm.js.map +1 -0
- package/lib/module/MarketMaker/components/OrderForm.js +177 -0
- package/lib/module/MarketMaker/components/OrderForm.js.map +1 -0
- package/lib/module/MarketMaker/components/SetMarketForm.js +441 -0
- package/lib/module/MarketMaker/components/SetMarketForm.js.map +1 -0
- package/lib/module/MarketMaker/components/WeightProgress.js +42 -0
- package/lib/module/MarketMaker/components/WeightProgress.js.map +1 -0
- package/lib/module/MarketMaker/index.js +398 -21
- package/lib/module/MarketMaker/index.js.map +1 -1
- package/lib/module/Socket/index.js +1 -1
- package/lib/module/Socket/index.js.map +1 -1
- package/lib/typescript/src/Components/Jerseys.d.ts +2 -1
- package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/api/index.d.ts +6 -0
- package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/MatchMarket/index.d.ts +33 -0
- package/lib/typescript/src/MarketComponents/components/MatchMarket/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts +2 -2
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TeamTournamentMarket/index.d.ts +29 -0
- package/lib/typescript/src/MarketComponents/components/TeamTournamentMarket/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/TournamentMarket/api/index.d.ts +13 -0
- package/lib/typescript/src/MarketComponents/components/TournamentMarket/api/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts +27 -0
- package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/index.d.ts +24 -2
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/api/index.d.ts +119 -2
- package/lib/typescript/src/MarketMaker/api/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/Contest.d.ts +14 -2
- package/lib/typescript/src/MarketMaker/components/Contest.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/ContestMarkets.d.ts +18 -2
- package/lib/typescript/src/MarketMaker/components/ContestMarkets.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/Dashboard.d.ts +13 -2
- package/lib/typescript/src/MarketMaker/components/Dashboard.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/FundActions.d.ts +12 -0
- package/lib/typescript/src/MarketMaker/components/FundActions.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/FundOwnershipList.d.ts +9 -0
- package/lib/typescript/src/MarketMaker/components/FundOwnershipList.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/FundSelector.d.ts +13 -0
- package/lib/typescript/src/MarketMaker/components/FundSelector.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/FundingRequestList.d.ts +11 -0
- package/lib/typescript/src/MarketMaker/components/FundingRequestList.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/ManageFundForm.d.ts +10 -0
- package/lib/typescript/src/MarketMaker/components/ManageFundForm.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/OrderForm.d.ts +12 -0
- package/lib/typescript/src/MarketMaker/components/OrderForm.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/SetMarketForm.d.ts +15 -0
- package/lib/typescript/src/MarketMaker/components/SetMarketForm.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/components/WeightProgress.d.ts +10 -0
- package/lib/typescript/src/MarketMaker/components/WeightProgress.d.ts.map +1 -0
- package/lib/typescript/src/MarketMaker/index.d.ts +3 -1
- package/lib/typescript/src/MarketMaker/index.d.ts.map +1 -1
- package/lib/typescript/src/Socket/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Components/Jerseys.tsx +9 -4
- package/src/LocationTracker/LocationStatus.tsx +1 -0
- package/src/MarketComponents/api/index.ts +27 -0
- package/src/MarketComponents/components/AthleteTournamentMarket/index.tsx +0 -1
- package/src/MarketComponents/components/MatchMarket/index.tsx +149 -0
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +54 -4
- package/src/MarketComponents/components/TeamTournamentMarket/index.tsx +123 -0
- package/src/MarketComponents/components/TournamentMarket/api/index.ts +74 -0
- package/src/MarketComponents/components/TournamentMarket/index.tsx +289 -0
- package/src/MarketComponents/index.tsx +3 -1
- package/src/MarketMaker/api/index.ts +901 -8
- package/src/MarketMaker/components/Contest.tsx +119 -33
- package/src/MarketMaker/components/ContestMarkets.tsx +461 -9
- package/src/MarketMaker/components/Dashboard.tsx +70 -24
- package/src/MarketMaker/components/FundActions.tsx +149 -0
- package/src/MarketMaker/components/FundOwnershipList.tsx +54 -0
- package/src/MarketMaker/components/FundSelector.tsx +65 -0
- package/src/MarketMaker/components/FundingRequestList.tsx +71 -0
- package/src/MarketMaker/components/ManageFundForm.tsx +83 -0
- package/src/MarketMaker/components/OrderForm.tsx +134 -0
- package/src/MarketMaker/components/SetMarketForm.tsx +264 -0
- package/src/MarketMaker/components/WeightProgress.tsx +29 -0
- package/src/MarketMaker/index.tsx +332 -29
- package/src/Socket/index.tsx +5 -2
- package/src/types.d.ts +124 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Image, FlatList } from 'react-native';
|
|
3
|
-
import type { BestAvailableOrderProps, ExternalPriceProps, LeagueProps, MarketProps, OrderProps, TradeProps } from '../../types';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Image, FlatList, TouchableOpacity } from 'react-native';
|
|
3
|
+
import type { AthleteProps, BestAvailableOrderProps, EventProps, ExternalPriceProps, FundOrderProps, FundProps, LeagueProps, MarketProps, MatchProps, OrderProps, TournamentProps, TradeProps } from '../../types';
|
|
4
4
|
import { view_styles } from '../../constants/styles';
|
|
5
5
|
import { Text } from '../../Components';
|
|
6
6
|
import ContestMarket from './ContestMarkets';
|
|
@@ -8,61 +8,147 @@ import { MarketMaketHelpers } from '../api';
|
|
|
8
8
|
import Colors from '../../constants/colors';
|
|
9
9
|
|
|
10
10
|
type ContestProps = {
|
|
11
|
+
fund:FundProps,
|
|
11
12
|
league?:LeagueProps,
|
|
12
13
|
contest_id:string,
|
|
13
14
|
contest_type:string,
|
|
15
|
+
time_detail:string,
|
|
14
16
|
contest_title:string,
|
|
15
17
|
best_available_orders:BestAvailableOrderProps[],
|
|
16
18
|
latest_trades:TradeProps[],
|
|
17
19
|
external_prices:ExternalPriceProps[],
|
|
20
|
+
backup_prices?:ExternalPriceProps[],
|
|
18
21
|
orders:OrderProps[],
|
|
19
|
-
|
|
22
|
+
init_show_detail?:boolean,
|
|
23
|
+
athletes:AthleteProps[],
|
|
24
|
+
fund_orders:FundOrderProps[],
|
|
25
|
+
markets:MarketProps[],
|
|
26
|
+
event?:EventProps,
|
|
27
|
+
tournament?:TournamentProps,
|
|
28
|
+
match?:MatchProps,
|
|
29
|
+
onSetMarket:(orders:OrderProps[], market:MarketProps, prices:ExternalPriceProps[]) => void
|
|
30
|
+
onClearMarket:(order_ids:string[]) => void,
|
|
31
|
+
onOrder:(order:OrderProps, available?:number) => void
|
|
20
32
|
}
|
|
21
33
|
|
|
22
|
-
const Contest = ({ contest_id, contest_type, league, contest_title, best_available_orders, latest_trades, orders, markets }:ContestProps) => {
|
|
34
|
+
const Contest = ({ fund, init_show_detail, contest_id, time_detail, event, external_prices, backup_prices, tournament, match, contest_type, league, contest_title, best_available_orders, latest_trades, orders, fund_orders, markets, onSetMarket, onClearMarket, onOrder }:ContestProps) => {
|
|
35
|
+
const [ show_detail, setShowDetail ] = useState(init_show_detail ? true : false);
|
|
36
|
+
const [ viewing_markets, setViewingMarkets ] = useState<MarketProps[]>([])
|
|
23
37
|
|
|
24
|
-
const {
|
|
38
|
+
const { stake_amt } = MarketMaketHelpers.getOrderStats(orders);
|
|
39
|
+
let my_action_market_ids = [ ...new Set(orders.map(o => o.market_id.toString()).concat(viewing_markets.map(m => m.market_id.toString()))) ]
|
|
40
|
+
const my_action_markets = markets.filter(m => my_action_market_ids.includes(m.market_id.toString()))
|
|
41
|
+
const my_action_event_markets = my_action_markets.filter(m => m.level == 'event');
|
|
42
|
+
//const my_action_player_markets = my_action_markets.filter(m => m.level != 'event');
|
|
43
|
+
const other_markets:any[] = markets.filter(m => !my_action_market_ids.includes(m.market_id.toString()));
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
const hedges = MarketMaketHelpers.getHedgesFromPositions(orders, markets);
|
|
47
|
+
const positive_hedges = hedges.reduce((a,b) => a + b.delayed_cash_no_draw, 0);
|
|
48
|
+
const negative_hedges = hedges.reduce((a,b) => a + b.delayed_cash_draw, 0);
|
|
49
|
+
const net_hedge = positive_hedges - negative_hedges
|
|
25
50
|
|
|
26
|
-
const
|
|
27
|
-
const market_orders = orders.filter(o => o.market_id == data.item.market_id);
|
|
51
|
+
const renderEventMarkets = (data:{ item:MarketProps, index:number }) => {
|
|
52
|
+
const market_orders = orders.filter(o => o.market_id == data.item.market_id);
|
|
53
|
+
const market_fund_orders = fund_orders.filter(fo => market_orders.map(o => o.order_id.toString()).includes(fo.order_id.toString()))
|
|
28
54
|
const market_trades = latest_trades.filter(t => t.market_id == data.item.market_id);
|
|
29
55
|
const market_available_orders = best_available_orders.filter(o => o.market_id == data.item.market_id);
|
|
56
|
+
const market_prices = external_prices.filter(p => p.market_id == data.item.market_id);
|
|
57
|
+
let backup_market_prices = backup_prices ? backup_prices.filter(p => p.market_id == data.item.market_id) : []
|
|
58
|
+
const { unique_var_1, default_var_1 } = MarketMaketHelpers.getAvailableVar1s(market_orders, market_available_orders, market_prices, data.item, backup_market_prices);
|
|
30
59
|
return (
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
<View style={{ borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
|
|
61
|
+
<ContestMarket
|
|
62
|
+
fund={fund}
|
|
63
|
+
contest_id={contest_id}
|
|
64
|
+
contest_type={contest_type}
|
|
65
|
+
market={data.item}
|
|
66
|
+
orders={market_orders}
|
|
67
|
+
fund_orders={market_fund_orders}
|
|
68
|
+
unique_var_1={unique_var_1}
|
|
69
|
+
latest_trades={market_trades}
|
|
70
|
+
best_available_orders={market_available_orders}
|
|
71
|
+
var_1={default_var_1}
|
|
72
|
+
external_prices={market_prices}
|
|
73
|
+
backup_prices={backup_market_prices}
|
|
74
|
+
event={event}
|
|
75
|
+
tournament={tournament}
|
|
76
|
+
match={match}
|
|
77
|
+
onSetMarket={onSetMarket}
|
|
78
|
+
onClearMarket={onClearMarket}
|
|
79
|
+
onOrder={onOrder}
|
|
80
|
+
/>
|
|
81
|
+
</View>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/*
|
|
86
|
+
const renderNonEventMarkets = (data:{item:MarketProps, index: number}) => {
|
|
87
|
+
const side_id_response = MarketMaketHelpers.getAvailableSideIds(orders, best_available_orders, external_prices, data.item);
|
|
88
|
+
side_id_response.unique_side_ids
|
|
89
|
+
return (
|
|
90
|
+
<View>
|
|
91
|
+
|
|
92
|
+
</View>
|
|
39
93
|
)
|
|
40
94
|
}
|
|
95
|
+
*/
|
|
41
96
|
|
|
42
97
|
return (
|
|
43
|
-
<View style={{ ...view_styles.section,
|
|
44
|
-
<
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<Text theme='header'>{contest_title}</Text>
|
|
98
|
+
<View style={{ ...view_styles.section, margin:5, borderWidth:1, borderColor:Colors.shades.shade600, padding:0 }}>
|
|
99
|
+
<TouchableOpacity style={{ ...view_styles.section_header }} onPress={() => setShowDetail(!show_detail)}>
|
|
100
|
+
<View style={{}}>
|
|
101
|
+
{league ?
|
|
102
|
+
<Image
|
|
103
|
+
source={{ uri: league.league_image }}
|
|
104
|
+
style={{ height:30, width:30, alignSelf:'center' }}
|
|
105
|
+
resizeMode='cover'
|
|
106
|
+
/>
|
|
107
|
+
:<></>}
|
|
54
108
|
</View>
|
|
55
|
-
<View>
|
|
56
|
-
<Text size={
|
|
109
|
+
<View style={{ flex:1, padding:8, justifyContent:'center' }}>
|
|
110
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>{contest_title}</Text>
|
|
111
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='semibold'>{time_detail}</Text>
|
|
57
112
|
</View>
|
|
58
|
-
|
|
113
|
+
|
|
114
|
+
<View style={{ marginLeft:10, padding:5, backgroundColor:Colors.shades.shade100, borderRadius:4 }}>
|
|
115
|
+
<Text size={12} color={Colors.brand.midnight} textAlign='center' weight='bold'>{[].length}</Text>
|
|
116
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} textAlign='center' weight='bold'>Markets</Text>
|
|
117
|
+
</View>
|
|
118
|
+
<View style={{ marginLeft:10, padding:5, backgroundColor:Colors.shades.shade100, borderRadius:4 }}>
|
|
119
|
+
<Text size={12} color={Colors.brand.midnight} textAlign='center' weight='bold'>${stake_amt.toFixed(2)}</Text>
|
|
120
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} textAlign='center' weight='bold'>Position</Text>
|
|
121
|
+
</View>
|
|
122
|
+
<View style={{ marginLeft:10, padding:5}}>
|
|
123
|
+
<Text size={12} color={Colors.brand.midnight} textAlign='center' weight='bold'>${net_hedge.toFixed(2)}</Text>
|
|
124
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} textAlign='center' weight='bold'>Hedge</Text>
|
|
125
|
+
</View>
|
|
126
|
+
</TouchableOpacity>
|
|
127
|
+
{show_detail ?
|
|
59
128
|
<View>
|
|
60
129
|
<FlatList
|
|
61
|
-
data={
|
|
62
|
-
renderItem={
|
|
63
|
-
keyExtractor={(item) => item.
|
|
130
|
+
data={my_action_event_markets}
|
|
131
|
+
renderItem={renderEventMarkets}
|
|
132
|
+
keyExtractor={(item) => item.toString()}
|
|
133
|
+
/>
|
|
134
|
+
<FlatList
|
|
135
|
+
data={[]}
|
|
136
|
+
renderItem={renderEventMarkets}
|
|
137
|
+
keyExtractor={(item) => item.toString()}
|
|
64
138
|
/>
|
|
139
|
+
{other_markets.length > 0 ?
|
|
140
|
+
<View style={{ ...view_styles.section_footer }}>
|
|
141
|
+
{other_markets.map(m => {
|
|
142
|
+
return (
|
|
143
|
+
<TouchableOpacity onPress={() => setViewingMarkets(viewing_markets.filter(vm => vm.market_id != m.market_id).concat(m))}>
|
|
144
|
+
<Text>{m.type == 'Stat' ? m.stat_label : m.type}</Text>
|
|
145
|
+
</TouchableOpacity>
|
|
146
|
+
)
|
|
147
|
+
})}
|
|
148
|
+
</View>
|
|
149
|
+
:<></>}
|
|
65
150
|
</View>
|
|
151
|
+
:<></>}
|
|
66
152
|
</View>
|
|
67
153
|
)
|
|
68
154
|
}
|