be-components 3.3.9 → 3.4.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/Authenticator/Components/AuthStrategyIdentifier.js +1 -0
- package/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -1
- package/lib/commonjs/Competition/components/AthleteMarketCard.js +1 -1
- package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -1
- package/lib/commonjs/Competition/components/MatchMarketCard.js +40 -35
- package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -1
- package/lib/commonjs/Competition/components/TeamEventCard.js +1 -0
- package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -1
- package/lib/commonjs/Components/Themed.js +2 -4
- package/lib/commonjs/Components/Themed.js.map +1 -1
- package/lib/commonjs/Components/Toggle.js +16 -25
- package/lib/commonjs/Components/Toggle.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js +6 -4
- package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js +7 -3
- package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/BestAvailableOrderCard.js +47 -55
- package/lib/commonjs/MarketComponents/components/BestAvailableOrderCard.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/ExternalPriceComparison.js +83 -75
- package/lib/commonjs/MarketComponents/components/ExternalPriceComparison.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +3 -2
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/OrderBook.js +45 -39
- package/lib/commonjs/MarketComponents/components/OrderBook.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/OrderBookChart.js +68 -64
- package/lib/commonjs/MarketComponents/components/OrderBookChart.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/OrderGradeBar.js +55 -42
- package/lib/commonjs/MarketComponents/components/OrderGradeBar.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +16 -10
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/Squares/components/BoardStats.js +5 -3
- package/lib/commonjs/Squares/components/BoardStats.js.map +1 -1
- package/lib/commonjs/Squares/components/EventCard.js +5 -2
- package/lib/commonjs/Squares/components/EventCard.js.map +1 -1
- package/lib/commonjs/Squares/components/MySquaresCard.js +2 -1
- package/lib/commonjs/Squares/components/MySquaresCard.js.map +1 -1
- package/lib/commonjs/Squares/components/MyStatsCard.js +5 -3
- package/lib/commonjs/Squares/components/MyStatsCard.js.map +1 -1
- package/lib/commonjs/Squares/components/PrizeCard.js +5 -2
- package/lib/commonjs/Squares/components/PrizeCard.js.map +1 -1
- package/lib/commonjs/Squares/components/SquareCard.js.map +1 -1
- package/lib/commonjs/Squares/components/SquareOwners.js +5 -2
- package/lib/commonjs/Squares/components/SquareOwners.js.map +1 -1
- package/lib/commonjs/Squares/components/SquaresBoard.js +8 -4
- package/lib/commonjs/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/commonjs/Squares/components/SquaresDetails.js +5 -2
- package/lib/commonjs/Squares/components/SquaresDetails.js.map +1 -1
- package/lib/commonjs/Squares/index.js +6 -3
- package/lib/commonjs/Squares/index.js.map +1 -1
- package/lib/commonjs/constants/styles.js +2 -4
- package/lib/commonjs/constants/styles.js.map +1 -1
- package/lib/commonjs/constants/useColors.js +36 -1
- package/lib/commonjs/constants/useColors.js.map +1 -1
- package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js +1 -0
- package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -1
- package/lib/module/Competition/components/AthleteMarketCard.js +1 -1
- package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -1
- package/lib/module/Competition/components/MatchMarketCard.js +24 -19
- package/lib/module/Competition/components/MatchMarketCard.js.map +1 -1
- package/lib/module/Competition/components/TeamEventCard.js +1 -0
- package/lib/module/Competition/components/TeamEventCard.js.map +1 -1
- package/lib/module/Components/Themed.js +3 -5
- package/lib/module/Components/Themed.js.map +1 -1
- package/lib/module/Components/Toggle.js +15 -23
- package/lib/module/Components/Toggle.js.map +1 -1
- package/lib/module/MarketComponents/components/AthleteMarket/index.js +6 -4
- package/lib/module/MarketComponents/components/AthleteMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js +7 -3
- package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/BestAvailableOrderCard.js +39 -47
- package/lib/module/MarketComponents/components/BestAvailableOrderCard.js.map +1 -1
- package/lib/module/MarketComponents/components/ExternalPriceComparison.js +51 -43
- package/lib/module/MarketComponents/components/ExternalPriceComparison.js.map +1 -1
- package/lib/module/MarketComponents/components/MatchMarket/index.js +3 -2
- package/lib/module/MarketComponents/components/MatchMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/OrderBook.js +31 -25
- package/lib/module/MarketComponents/components/OrderBook.js.map +1 -1
- package/lib/module/MarketComponents/components/OrderBookChart.js +47 -42
- package/lib/module/MarketComponents/components/OrderBookChart.js.map +1 -1
- package/lib/module/MarketComponents/components/OrderGradeBar.js +52 -39
- package/lib/module/MarketComponents/components/OrderGradeBar.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +16 -10
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/Squares/components/BoardStats.js +5 -3
- package/lib/module/Squares/components/BoardStats.js.map +1 -1
- package/lib/module/Squares/components/EventCard.js +5 -2
- package/lib/module/Squares/components/EventCard.js.map +1 -1
- package/lib/module/Squares/components/MySquaresCard.js +2 -1
- package/lib/module/Squares/components/MySquaresCard.js.map +1 -1
- package/lib/module/Squares/components/MyStatsCard.js +5 -3
- package/lib/module/Squares/components/MyStatsCard.js.map +1 -1
- package/lib/module/Squares/components/PrizeCard.js +5 -2
- package/lib/module/Squares/components/PrizeCard.js.map +1 -1
- package/lib/module/Squares/components/SquareCard.js.map +1 -1
- package/lib/module/Squares/components/SquareOwners.js +5 -2
- package/lib/module/Squares/components/SquareOwners.js.map +1 -1
- package/lib/module/Squares/components/SquaresBoard.js +8 -4
- package/lib/module/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/module/Squares/components/SquaresDetails.js +5 -2
- package/lib/module/Squares/components/SquaresDetails.js.map +1 -1
- package/lib/module/Squares/index.js +6 -3
- package/lib/module/Squares/index.js.map +1 -1
- package/lib/module/constants/styles.js +2 -4
- package/lib/module/constants/styles.js.map +1 -1
- package/lib/module/constants/useColors.js +37 -2
- package/lib/module/constants/useColors.js.map +1 -1
- package/lib/typescript/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/MatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/TeamEventCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Themed.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/BestAvailableOrderCard.d.ts +3 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/BestAvailableOrderCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/ExternalPriceComparison.d.ts +3 -2
- package/lib/typescript/lib/commonjs/MarketComponents/components/ExternalPriceComparison.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/OrderBook.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/OrderBookChart.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/OrderGradeBar.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/BoardStats.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/EventCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/MySquaresCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/MyStatsCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/PrizeCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquareOwners.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquaresBoard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquaresDetails.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Squares/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/constants/styles.d.ts +0 -4
- package/lib/typescript/lib/commonjs/constants/useColors.d.ts +18 -0
- package/lib/typescript/lib/commonjs/constants/useColors.d.ts.map +1 -1
- package/lib/typescript/lib/module/Authenticator/Components/AuthStrategyIdentifier.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/MatchMarketCard.d.ts +1 -2
- package/lib/typescript/lib/module/Competition/components/MatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/TeamEventCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Themed.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Toggle.d.ts +1 -2
- package/lib/typescript/lib/module/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/BestAvailableOrderCard.d.ts +4 -3
- package/lib/typescript/lib/module/MarketComponents/components/BestAvailableOrderCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/ExternalPriceComparison.d.ts +4 -4
- package/lib/typescript/lib/module/MarketComponents/components/ExternalPriceComparison.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/OrderBook.d.ts +1 -2
- package/lib/typescript/lib/module/MarketComponents/components/OrderBook.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/OrderBookChart.d.ts +1 -2
- package/lib/typescript/lib/module/MarketComponents/components/OrderBookChart.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/OrderGradeBar.d.ts +1 -2
- package/lib/typescript/lib/module/MarketComponents/components/OrderGradeBar.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/BoardStats.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/EventCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/MySquaresCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/MyStatsCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/PrizeCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquareOwners.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquaresBoard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquaresDetails.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/index.d.ts +2 -1
- package/lib/typescript/lib/module/Squares/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/constants/styles.d.ts +0 -4
- package/lib/typescript/lib/module/constants/useColors.d.ts +18 -0
- package/lib/typescript/lib/module/constants/useColors.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/src/Components/Themed.d.ts.map +1 -1
- package/lib/typescript/src/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/BestAvailableOrderCard.d.ts +3 -1
- package/lib/typescript/src/MarketComponents/components/BestAvailableOrderCard.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/ExternalPriceComparison.d.ts +3 -1
- package/lib/typescript/src/MarketComponents/components/ExternalPriceComparison.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/OrderBook.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/OrderBookChart.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/OrderGradeBar.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/index.d.ts +6 -2
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/SquareCard.d.ts.map +1 -1
- package/lib/typescript/src/Squares/index.d.ts +5 -1
- package/lib/typescript/src/Squares/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/styles.d.ts +0 -2
- package/lib/typescript/src/constants/styles.d.ts.map +1 -1
- package/lib/typescript/src/constants/useColors.d.ts +18 -0
- package/lib/typescript/src/constants/useColors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Authenticator/Components/AuthStrategyIdentifier.tsx +2 -2
- package/src/Competition/components/AthleteMarketCard.tsx +1 -1
- package/src/Competition/components/MarketsCard.tsx +1 -1
- package/src/Competition/components/MatchMarketCard.tsx +22 -21
- package/src/Competition/components/TeamEventCard.tsx +1 -1
- package/src/Components/Themed.tsx +3 -3
- package/src/Components/Toggle.tsx +15 -17
- package/src/MarketComponents/components/AthleteMarket/index.tsx +4 -4
- package/src/MarketComponents/components/AthleteTournamentMarket/index.tsx +3 -3
- package/src/MarketComponents/components/BestAvailableOrderCard.tsx +34 -23
- package/src/MarketComponents/components/ExternalPriceComparison.tsx +40 -42
- package/src/MarketComponents/components/MatchMarket/index.tsx +3 -3
- package/src/MarketComponents/components/OrderBook.tsx +25 -23
- package/src/MarketComponents/components/OrderBookChart.tsx +62 -58
- package/src/MarketComponents/components/OrderGradeBar.tsx +23 -19
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +9 -9
- package/src/Squares/components/BoardStats.tsx +2 -2
- package/src/Squares/components/EventCard.tsx +2 -2
- package/src/Squares/components/MySquaresCard.tsx +1 -1
- package/src/Squares/components/MyStatsCard.tsx +2 -2
- package/src/Squares/components/PrizeCard.tsx +2 -2
- package/src/Squares/components/SquareCard.tsx +2 -0
- package/src/Squares/components/SquareOwners.tsx +2 -2
- package/src/Squares/components/SquaresBoard.tsx +4 -4
- package/src/Squares/components/SquaresDetails.tsx +2 -2
- package/src/Squares/index.tsx +5 -4
- package/src/constants/styles.ts +2 -2
- package/src/constants/useColors.tsx +37 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FlatList
|
|
2
|
+
import { FlatList } from "react-native"
|
|
3
3
|
import type { MarketProps, OrderProps } from '../../types';
|
|
4
4
|
import OrderGradeBar from './OrderGradeBar';
|
|
5
|
-
import { Icons
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
5
|
+
import { Icons } from '../../Components';
|
|
7
6
|
import { MarketComponentHelpers } from '../api';
|
|
8
7
|
import moment from 'moment-mini';
|
|
8
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
9
|
+
import { useColors } from '../../constants/useColors';
|
|
9
10
|
|
|
10
11
|
type OrderBookCardProps = {
|
|
11
12
|
player_id?:string,
|
|
@@ -17,6 +18,7 @@ type OrderBookCardProps = {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
const OrderBookCard = ({ player_id, orders, market, show_orders, show_grades, onBuy }:OrderBookCardProps) => {
|
|
21
|
+
const Colors = useColors();
|
|
20
22
|
const trade_side_orders = orders.filter(o => o.side === market.trade_side).sort((a,b) => a.probability - b.probability).splice(0, 9)
|
|
21
23
|
const o_side_orders = orders.filter(o => o.side !== market.trade_side).sort((a,b) => a.probability - b.probability).splice(0,9)
|
|
22
24
|
|
|
@@ -36,50 +38,50 @@ const OrderBookCard = ({ player_id, orders, market, show_orders, show_grades, on
|
|
|
36
38
|
const cl = data.item.market_type === 'FOR_MONEY' ? '$' : 'E'
|
|
37
39
|
const mine = data.item.player_id == player_id ? true : false
|
|
38
40
|
return (
|
|
39
|
-
<
|
|
41
|
+
<Button transparent float style={{ minHeight:40, padding:8, backgroundColor:show_orders||mine?Colors.order_book.selected:Colors.views.header, margin:4, marginLeft:8, borderRadius:4 }} onPress={() => handleOrderPress(data.item)}>
|
|
40
42
|
{show_orders || mine ?
|
|
41
|
-
<View style={{
|
|
43
|
+
<View transparent style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
|
|
42
44
|
<OrderGradeBar mask={show_grades?false:true} grade={data.item.grade} view_type='book' />
|
|
43
|
-
<Text size={12}
|
|
44
|
-
<Text size={12}
|
|
45
|
+
<Text size={12} theme='h2' textAlign='center' style={{flex:1/2}}>{MarketComponentHelpers.getOddsLabel(data.item.odds)}</Text>
|
|
46
|
+
<Text size={12} theme='h2' textAlign='center' style={{flex:1/2}}>{cl}{data.item.open_amt.toFixed(2)}</Text>
|
|
45
47
|
</View>
|
|
46
48
|
:
|
|
47
|
-
<View style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
|
|
48
|
-
<Icons.LockClosedIcon color={Colors.
|
|
49
|
+
<View transparent style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
|
|
50
|
+
<Icons.LockClosedIcon color={Colors.text.gold} size={14}/>
|
|
49
51
|
</View>
|
|
50
52
|
}
|
|
51
53
|
{mine ?
|
|
52
|
-
<View style={{ position:'absolute', right:0, bottom:0, top:0, width:5, backgroundColor:Colors.
|
|
54
|
+
<View style={{ position:'absolute', right:0, bottom:0, top:0, width:5, backgroundColor:Colors.text.action, borderRadius:4 }} />
|
|
53
55
|
:<></>}
|
|
54
|
-
</
|
|
56
|
+
</Button>
|
|
55
57
|
)
|
|
56
58
|
}
|
|
57
59
|
const renderOSide = (data: {item: OrderProps, index:number}) => {
|
|
58
60
|
const cl = data.item.market_type === 'FOR_MONEY' ? '$' : 'E'
|
|
59
61
|
const mine = data.item.player_id == player_id ? true : false
|
|
60
62
|
return (
|
|
61
|
-
<
|
|
63
|
+
<Button float style={{ minHeight:40, padding:8, backgroundColor:show_orders||mine?Colors.views.background:Colors.views.header, margin:4, marginLeft:8, borderRadius:4 }} onPress={() => handleOrderPress(data.item)}>
|
|
62
64
|
{show_orders || mine ?
|
|
63
|
-
<View style={{
|
|
64
|
-
<Text size={12}
|
|
65
|
-
<Text size={12}
|
|
66
|
-
<OrderGradeBar
|
|
65
|
+
<View transparent style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
|
|
66
|
+
<Text size={12} theme='h2' textAlign='center' style={{flex:1}}>{cl}{data.item.open_amt.toFixed(2)}</Text>
|
|
67
|
+
<Text size={12} theme='h2' textAlign='center' style={{flex:1}}>{MarketComponentHelpers.getOddsLabel(data.item.odds)}</Text>
|
|
68
|
+
<OrderGradeBar mask={show_grades?false:true} grade={data.item.grade} view_type='book' />
|
|
67
69
|
</View>
|
|
68
70
|
:
|
|
69
|
-
<View style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
|
|
70
|
-
<Icons.LockClosedIcon color={Colors.
|
|
71
|
+
<View transparent style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
|
|
72
|
+
<Icons.LockClosedIcon color={Colors.text.gold} size={14}/>
|
|
71
73
|
</View>
|
|
72
74
|
}
|
|
73
75
|
{mine ?
|
|
74
|
-
<View style={{ position:'absolute', left:0, bottom:0, top:0, width:5, backgroundColor:Colors.
|
|
76
|
+
<View style={{ position:'absolute', left:0, bottom:0, top:0, width:5, backgroundColor:Colors.text.action, borderRadius:4 }} />
|
|
75
77
|
:<></>}
|
|
76
|
-
</
|
|
78
|
+
</Button>
|
|
77
79
|
)
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
return (
|
|
81
83
|
<View>
|
|
82
|
-
<View style={{
|
|
84
|
+
<View style={{ flexGrow:1, flexDirection:'row' }}>
|
|
83
85
|
<View nativeID="other_side_orders" style={{ flex:1 }}>
|
|
84
86
|
<FlatList data={o_side_orders} renderItem={renderOSide} keyExtractor={(item) => item.order_id.toString()}/>
|
|
85
87
|
</View>
|
|
@@ -88,8 +90,8 @@ const OrderBookCard = ({ player_id, orders, market, show_orders, show_grades, on
|
|
|
88
90
|
</View>
|
|
89
91
|
</View>
|
|
90
92
|
<View nativeID='legend' style={{ flexDirection:'row', alignItems:'center', justifyContent:'center', padding:10 }}>
|
|
91
|
-
<View style={{ height:10, width:10, borderRadius:4, marginRight:5, backgroundColor:Colors.
|
|
92
|
-
<Text size={12}
|
|
93
|
+
<View style={{ height:10, width:10, borderRadius:4, marginRight:5, backgroundColor:Colors.text.action }} />
|
|
94
|
+
<Text size={12} theme='description'>Your order</Text>
|
|
93
95
|
</View>
|
|
94
96
|
</View>
|
|
95
97
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { ActivityIndicator, FlatList
|
|
2
|
+
import { ActivityIndicator, FlatList } from "react-native"
|
|
3
3
|
import type { MarketProps, OrderBookProps } from '../../types';
|
|
4
|
-
import { Text } from '../../Components';
|
|
5
|
-
import Colors from '../../constants/colors';
|
|
6
4
|
import { MarketComponentHelpers } from '../api';
|
|
5
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
6
|
+
import { useColors } from '../../constants/useColors';
|
|
7
7
|
|
|
8
8
|
type OrderBookChartProps = {
|
|
9
9
|
order_book:OrderBookProps,
|
|
@@ -18,15 +18,15 @@ type OrderBookChartProps = {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const OrderBookChart = ({ order_book, market, active_var_1, onSelectVar1, away_label, home_label, side_id }:OrderBookChartProps) => {
|
|
21
|
+
const Colors = useColors();
|
|
21
22
|
const [ loading ] = useState(false)
|
|
22
23
|
const [ expanded, setExpanded ] = useState(false);
|
|
23
24
|
const [ width, setWidth ] = useState(300)
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
console.log(width)
|
|
26
27
|
const renderVariableBar = (data: { item: number, index:number }) => {
|
|
27
28
|
const isActive = data.item == active_var_1 ? true : false
|
|
28
29
|
let trade_side_stat = order_book.book_stats.find(s => s.side === market.trade_side && s.var_1 == data.item)
|
|
29
|
-
console.log(data.item)
|
|
30
30
|
if(side_id){ trade_side_stat = order_book.book_stats.find(s => s.side === market.trade_side && s.var_1 == data.item && s.side_id == side_id)}
|
|
31
31
|
let o_side_stat = order_book.book_stats.find(s => {
|
|
32
32
|
if(s.side !== market.trade_side && market.type === 'Spread' && s.var_1 * -1 == data.item){ return s }
|
|
@@ -40,55 +40,59 @@ const OrderBookChart = ({ order_book, market, active_var_1, onSelectVar1, away_l
|
|
|
40
40
|
return undefined
|
|
41
41
|
})
|
|
42
42
|
}
|
|
43
|
+
|
|
43
44
|
return (
|
|
44
|
-
<
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<></>
|
|
49
|
-
}
|
|
50
|
-
<View style={{flex:1, flexDirection:'row', alignItems:'center', justifyContent:'space-between'}} onLayout={(event) => {
|
|
51
|
-
//if(Math.abs(event.nativeEvent.layout.width - width) < 5){ return }
|
|
52
|
-
return setWidth(event.nativeEvent.layout.width)
|
|
53
|
-
}}>
|
|
54
|
-
{o_side_stat ?
|
|
55
|
-
<View style={{ width: width * (1 - o_side_stat.probability), height:25, backgroundColor:Colors.chart.cyan, borderRightWidth:1, borderRightColor:Colors.brand.cyan, borderTopLeftRadius:4, borderBottomLeftRadius:4, flexGrow:0 }}>
|
|
56
|
-
{100 > -800 ?
|
|
57
|
-
<View style={{ position: 'absolute', paddingRight:5, top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'flex-end' }}>
|
|
58
|
-
<Text size={12} textAlign='right' color={Colors.shades.white}>{MarketComponentHelpers.getOddsLabel(MarketComponentHelpers.calcAmericanOddsFromProbability(o_side_stat.probability))}</Text>
|
|
59
|
-
</View>
|
|
60
|
-
:<Text size={12} textAlign='right' style={{padding:8}} color={Colors.shades.white}>-</Text> }
|
|
61
|
-
</View>
|
|
45
|
+
<View float>
|
|
46
|
+
<Button transparent style={{ padding:0, flexDirection:'row', alignItems:'center', backgroundColor:isActive?Colors.order_book.selected:Colors.views.background }} onPress={() => onSelectVar1(data.item)}>
|
|
47
|
+
{market.var_1_required ?
|
|
48
|
+
<Text size={12} textAlign='left' theme='description'>{market.type === 'Spread'? data.item * -1: data.item}</Text>
|
|
62
49
|
:
|
|
63
|
-
|
|
64
|
-
<Text size={12} textAlign='right' style={{padding:8}} color={Colors.shades.black}>No Orders</Text>
|
|
65
|
-
</View>
|
|
50
|
+
<></>
|
|
66
51
|
}
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
52
|
+
<View transparent style={{flexGrow:1, flexDirection:'row', alignItems:'center', justifyContent:'space-between'}} onLayout={(event) => {
|
|
53
|
+
//if(Math.abs(event.nativeEvent.layout.width - width) < 5){ return }
|
|
54
|
+
return setWidth(event.nativeEvent.layout.width)
|
|
55
|
+
}}>
|
|
56
|
+
{o_side_stat ?
|
|
57
|
+
<View transparent style={{ width: width * (1 - o_side_stat.probability), height:25, backgroundColor:Colors.text.highlight, borderRightWidth:1, borderRightColor:Colors.text.highlight, borderTopLeftRadius:4, borderBottomLeftRadius:4, flexGrow:0 }}>
|
|
58
|
+
{100 > -800 ?
|
|
59
|
+
<View transparent style={{ position: 'absolute', paddingRight:5, top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'flex-end' }}>
|
|
60
|
+
<Text size={12} textAlign='right' theme='h2'>{MarketComponentHelpers.getOddsLabel(MarketComponentHelpers.calcAmericanOddsFromProbability(o_side_stat.probability))}</Text>
|
|
61
|
+
</View>
|
|
62
|
+
:<Text size={12} textAlign='right' style={{padding:8}} theme='h1'>-</Text> }
|
|
72
63
|
</View>
|
|
73
|
-
|
|
64
|
+
:
|
|
65
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center', justifyContent:'space-between'}}>
|
|
66
|
+
<Text size={12} textAlign='right' style={{padding:8}} theme='description'>No Orders</Text>
|
|
67
|
+
</View>
|
|
68
|
+
}
|
|
69
|
+
{trade_side_stat ?
|
|
70
|
+
<View transparent style={{ width: width * (1 -trade_side_stat.probability), height:25, backgroundColor:Colors.text.action, borderLeftWidth:1, borderLeftColor:Colors.text.action, borderTopRightRadius:4, borderBottomRightRadius:4, flexGrow:0 }}>
|
|
71
|
+
{100 > -800 ?
|
|
72
|
+
<View transparent style={{ position: 'absolute', paddingLeft:5, top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'flex-start' }}>
|
|
73
|
+
<Text size={12} textAlign='right' theme='h1'>{MarketComponentHelpers.getOddsLabel(MarketComponentHelpers.calcAmericanOddsFromProbability(trade_side_stat.probability))}</Text>
|
|
74
|
+
</View>
|
|
75
|
+
:<Text size={12} textAlign='right' style={{padding:8}} theme='h2'>-</Text>}
|
|
76
|
+
</View>
|
|
77
|
+
:
|
|
78
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center', justifyContent:'space-between'}}>
|
|
79
|
+
<Text size={12} textAlign='left' style={{padding:8}} theme='description'>No Orders</Text>
|
|
80
|
+
</View>
|
|
81
|
+
}
|
|
74
82
|
</View>
|
|
83
|
+
{market.var_1_required ?
|
|
84
|
+
<Text size={12} textAlign='right' style={{padding:8, flex:1/12}} theme='description'>{data.item}</Text>
|
|
75
85
|
:
|
|
76
|
-
|
|
77
|
-
<Text size={12} textAlign='left' style={{padding:8}} color={Colors.shades.black}>No Orders</Text>
|
|
78
|
-
</View>
|
|
86
|
+
<></>
|
|
79
87
|
}
|
|
80
|
-
</
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:
|
|
84
|
-
<></>
|
|
85
|
-
}
|
|
86
|
-
</TouchableOpacity>
|
|
88
|
+
</Button>
|
|
89
|
+
</View>
|
|
90
|
+
|
|
87
91
|
)
|
|
88
92
|
}
|
|
89
93
|
if(!market || loading || !order_book){ return (
|
|
90
94
|
<View style={{padding:10}}>
|
|
91
|
-
<ActivityIndicator size='small' color={Colors.
|
|
95
|
+
<ActivityIndicator size='small' color={Colors.text.h1} />
|
|
92
96
|
</View>
|
|
93
97
|
) }
|
|
94
98
|
|
|
@@ -113,26 +117,26 @@ const OrderBookChart = ({ order_book, market, active_var_1, onSelectVar1, away_l
|
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
return (
|
|
116
|
-
<View style={{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<Text size={14}
|
|
121
|
-
<Text size={14}
|
|
122
|
-
<Text size={14} weight='semibold' color={Colors.shades.black} textAlign='right'>{home_label?.toUpperCase()??'TBD'}</Text>
|
|
120
|
+
<View transparent style={{flexGrow:1, margin:20, marginTop:5 }}>
|
|
121
|
+
|
|
122
|
+
<View transparent style={{flexDirection:'row', justifyContent:'space-between', alignItems:'center', marginBottom:8}}>
|
|
123
|
+
<Text size={14} theme='h2' textAlign='left'>{away_label?.toUpperCase()??'TBD'}</Text>
|
|
124
|
+
<Text size={14} theme='h2' textAlign='center'>{market.stat_label ?? market.type?.toUpperCase()??'TBD'}</Text>
|
|
125
|
+
<Text size={14} theme='h2' textAlign='right'>{home_label?.toUpperCase()??'TBD'}</Text>
|
|
123
126
|
</View>
|
|
124
127
|
<FlatList data={var_1_options.sort((a,b) => a - b)} renderItem={renderVariableBar} keyExtractor={(item) => item.toString()} extraData={width} />
|
|
125
|
-
|
|
128
|
+
{market.var_1_required ?
|
|
129
|
+
<Button transparent style={{ padding:10 }} onPress={() => setExpanded(!expanded)}>
|
|
126
130
|
{!expanded ?
|
|
127
|
-
<Text size={12} color={Colors.
|
|
131
|
+
<Text size={12} color={Colors.text.action} weight='semibold' textAlign='center'>{unique_var_1.length} Other {market.type}s Available</Text>
|
|
128
132
|
:
|
|
129
|
-
<Text size={12} color={Colors.
|
|
133
|
+
<Text size={12} color={Colors.text.error} weight='semibold' textAlign='center'>Hide Alternatives</Text>
|
|
130
134
|
}
|
|
131
|
-
</
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<Text size={12} textAlign='center' style={{padding:8}}
|
|
135
|
-
}
|
|
135
|
+
</Button>
|
|
136
|
+
:<></>}
|
|
137
|
+
{unique_var_1.length == 0 ?
|
|
138
|
+
<Text size={12} textAlign='center' style={{padding:8}} theme='description'>No Active Orders</Text>
|
|
139
|
+
:<></>}
|
|
136
140
|
</View>
|
|
137
141
|
)
|
|
138
142
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { FlatList
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
3
3
|
import { Icons } from '../../Components';
|
|
4
|
-
import
|
|
4
|
+
import { Button, View } from '../../Components/Themed';
|
|
5
|
+
import { useColors } from '../../constants/useColors';
|
|
5
6
|
|
|
6
7
|
//Typecast a grade box object
|
|
7
8
|
type GradeBoxType = {
|
|
@@ -12,14 +13,7 @@ type GradeBoxType = {
|
|
|
12
13
|
locked_color:string
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
const grade_boxes:GradeBoxType[] = [
|
|
17
|
-
{ min: 0, max: 79, success_color: 'rgba(125,205,133,0.2)', fail_color: 'rgba(213,87, 59, 0.2)', locked_color: Colors.shades.shade100 },
|
|
18
|
-
{ min: 80, max: 94, success_color: 'rgba(125,205,133,0.4)', fail_color: 'rgba(213,87, 59, 0.4)', locked_color: Colors.shades.shade100 },
|
|
19
|
-
{ min:95, max: 97.5, success_color: 'rgba(125,205,133,0.6)', fail_color: 'rgba(213,87, 59, 0.6)', locked_color: Colors.shades.shade100 },
|
|
20
|
-
{ min:97.6, max: 99.99, success_color: 'rgba(125,205,133,0.8)', fail_color: 'rgba(213,87, 59, 0)', locked_color: Colors.shades.shade100 },
|
|
21
|
-
{ min: 100, max: 200, success_color: 'rgba(125,205,133,1)', fail_color: 'rgba(213,87, 59, 0)', locked_color: Colors.shades.shade100 }
|
|
22
|
-
]
|
|
16
|
+
|
|
23
17
|
|
|
24
18
|
type OrderGradeBarProps = {
|
|
25
19
|
mask?:boolean,
|
|
@@ -30,7 +24,17 @@ type OrderGradeBarProps = {
|
|
|
30
24
|
|
|
31
25
|
//OrderGradeBar React Component
|
|
32
26
|
const OrderGradeBar = ({ grade, view_type, mask, onSelectGrade }:OrderGradeBarProps ) => {
|
|
33
|
-
|
|
27
|
+
const Colors = useColors();
|
|
28
|
+
|
|
29
|
+
//Stage the boxes and set the min / max and colors
|
|
30
|
+
const grade_boxes:GradeBoxType[] = [
|
|
31
|
+
{ min: 0, max: 79, success_color: 'rgba(125,205,133,0.2)', fail_color: 'rgba(213,87, 59, 0.2)', locked_color: Colors.views.header },
|
|
32
|
+
{ min: 80, max: 94, success_color: 'rgba(125,205,133,0.4)', fail_color: 'rgba(213,87, 59, 0.4)', locked_color: Colors.views.header },
|
|
33
|
+
{ min:95, max: 97.5, success_color: 'rgba(125,205,133,0.6)', fail_color: 'rgba(213,87, 59, 0.6)', locked_color: Colors.views.header },
|
|
34
|
+
{ min:97.6, max: 99.99, success_color: 'rgba(125,205,133,0.8)', fail_color: 'rgba(213,87, 59, 0)', locked_color: Colors.views.header },
|
|
35
|
+
{ min: 100, max: 200, success_color: 'rgba(125,205,133,1)', fail_color: 'rgba(213,87, 59, 0)', locked_color: Colors.views.header }
|
|
36
|
+
]
|
|
37
|
+
|
|
34
38
|
//Get the player's role
|
|
35
39
|
let premium = true
|
|
36
40
|
if(mask){ premium = false }
|
|
@@ -48,10 +52,10 @@ const OrderGradeBar = ({ grade, view_type, mask, onSelectGrade }:OrderGradeBarPr
|
|
|
48
52
|
const locked = !premium ? true : false
|
|
49
53
|
//Render the box
|
|
50
54
|
return (
|
|
51
|
-
<View style={{ margin:2, height:15, width:15, borderRadius:4, backgroundColor:locked? data.item.locked_color : filled ? success ? data.item.success_color : data.item.fail_color : Colors.
|
|
55
|
+
<View float transparent style={{ margin:2, height:15, width:15, borderRadius:4, backgroundColor:locked? data.item.locked_color : filled ? success ? data.item.success_color : data.item.fail_color : Colors.borders.light }}>
|
|
52
56
|
{locked ?
|
|
53
57
|
<View style={{ position:'absolute', top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
|
|
54
|
-
<Icons.LockClosedIcon size={10} color={Colors.
|
|
58
|
+
<Icons.LockClosedIcon size={10} color={Colors.text.gold} />
|
|
55
59
|
</View>
|
|
56
60
|
:<></>}
|
|
57
61
|
</View>
|
|
@@ -72,7 +76,7 @@ const OrderGradeBar = ({ grade, view_type, mask, onSelectGrade }:OrderGradeBarPr
|
|
|
72
76
|
|
|
73
77
|
//Render the box
|
|
74
78
|
return (
|
|
75
|
-
<View style={{ margin:1, height:4, width:15, borderRadius:4, backgroundColor:locked? data.item.locked_color : filled ? success ? data.item.success_color : data.item.fail_color : Colors.
|
|
79
|
+
<View transparent style={{ margin:1, height:4, width:15, borderRadius:4, backgroundColor:locked? data.item.locked_color : filled ? success ? data.item.success_color : data.item.fail_color : Colors.views.header }} />
|
|
76
80
|
)
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -88,19 +92,19 @@ const OrderGradeBar = ({ grade, view_type, mask, onSelectGrade }:OrderGradeBarPr
|
|
|
88
92
|
return (<></>)
|
|
89
93
|
}
|
|
90
94
|
return (
|
|
91
|
-
<View style={{ height:3, backgroundColor:success?Colors.
|
|
95
|
+
<View style={{ height:3, backgroundColor:success?Colors.text.success:Colors.text.error, marginRight:3, marginLeft:3 }} />
|
|
92
96
|
)
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
return (
|
|
96
|
-
<View>
|
|
97
|
-
<
|
|
100
|
+
<View transparent>
|
|
101
|
+
<Button style={{ padding:0 }} transparent disabled={onSelectGrade ? false : true} onPress={() => onSelectGrade ? onSelectGrade() : console.log('')}>
|
|
98
102
|
{view_type === 'card' ?
|
|
99
103
|
<FlatList style={{ alignSelf:'center' }} horizontal data={grade_boxes} renderItem={renderGradeBoxes} keyExtractor={(item) => item.min.toString()} />
|
|
100
104
|
:view_type === 'book' ?
|
|
101
105
|
<FlatList data={[ ...grade_boxes ].reverse()} renderItem={renderGradeDashes} keyExtractor={(item) => item.min.toString()} />
|
|
102
106
|
:<></>}
|
|
103
|
-
</
|
|
107
|
+
</Button>
|
|
104
108
|
</View>
|
|
105
109
|
)
|
|
106
110
|
}
|
|
@@ -260,12 +260,12 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
260
260
|
const athlete_trades = latest_trades.filter(t => t.market_type == 'FOR_MONEY' && t.market_id == data.item.market_id && t.side_type == 'athlete' && t.side_id == data.item.side_id);
|
|
261
261
|
const athlete_orders = best_available_orders.filter(t => t.market_id == data.item.market_id && t.side_type == 'athlete' && t.side_id == data.item.side_id);
|
|
262
262
|
return (
|
|
263
|
-
<View transparent style={{ flexGrow:1 }}>
|
|
264
263
|
<AthleteMarket
|
|
265
264
|
event={event}
|
|
266
265
|
event_type='team'
|
|
267
266
|
athlete={athlete}
|
|
268
267
|
float
|
|
268
|
+
style={{ flexGrow:1, margin:5 }}
|
|
269
269
|
direction={hot_markets_direction=='vertical' ? 'horizontal' : 'vertical'}
|
|
270
270
|
show_grades={show_grades}
|
|
271
271
|
market={market}
|
|
@@ -278,7 +278,6 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
278
278
|
onOrder={onOrder}
|
|
279
279
|
onView={onView}
|
|
280
280
|
/>
|
|
281
|
-
</View>
|
|
282
281
|
)
|
|
283
282
|
case 'event':
|
|
284
283
|
const event_trades = latest_trades.filter(t => t.market_type == 'FOR_MONEY' && t.market_id == data.item.market_id);
|
|
@@ -334,16 +333,16 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
334
333
|
<View float={float} style={[style]}>
|
|
335
334
|
{sponsor ?
|
|
336
335
|
<LinearGradient style={{ marginTop:-1, marginLeft:-1, marginRight:-1, padding:10, flexDirection:'row', alignItems:'center', borderTopRightRadius:8, borderTopLeftRadius:8 }} start={{x: 0, y: 0}} end={{x: 1, y: 0}} colors={[sponsor.brand_primary ?? C.text.h1, sponsor.brand_secondary ?? C.text.h1]}>
|
|
337
|
-
<View style={{ height:30, width:30, borderRadius:4, backgroundColor:Colors.shades.white }}>
|
|
336
|
+
<View transparent style={{ height:30, width:30, borderRadius:4, backgroundColor:Colors.shades.white }}>
|
|
338
337
|
<Image
|
|
339
338
|
source={{ uri: sponsor.company_image?.url }}
|
|
340
339
|
style={{ height:30, width:30, borderRadius:4 }}
|
|
341
340
|
resizeMode='cover'
|
|
342
341
|
/>
|
|
343
342
|
</View>
|
|
344
|
-
<View style={{ flex:1, marginLeft:10 }}>
|
|
343
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
345
344
|
<Text size={12} color={Colors.shades.white} weight='bold'>Brought to you by {sponsor.company_name}</Text>
|
|
346
|
-
<View style={{ marginTop:3, flexDirection:'row', alignItems:'center' }}>
|
|
345
|
+
<View transparent style={{ marginTop:3, flexDirection:'row', alignItems:'center' }}>
|
|
347
346
|
{show_id ?
|
|
348
347
|
<Text style={{ marginLeft:2, marginRight:3 }} size={12} color={Colors.shades.white} weight='semibold' selectable>{event.event_id} </Text>
|
|
349
348
|
:<></>}
|
|
@@ -352,7 +351,7 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
352
351
|
:<></>}
|
|
353
352
|
</View>
|
|
354
353
|
</View>
|
|
355
|
-
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
354
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center' }}>
|
|
356
355
|
<Icons.TVIcon size={10} color={Colors.shades.white} />
|
|
357
356
|
<Text style={{ marginLeft:8 }} size={12} color={Colors.shades.white} weight='semibold'>{event.info?.broadcast?.network}</Text>
|
|
358
357
|
</View>
|
|
@@ -411,7 +410,7 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
411
410
|
:<></>}
|
|
412
411
|
</View>
|
|
413
412
|
}
|
|
414
|
-
<View
|
|
413
|
+
<View type='body' nativeID='primary_markets' style={{ flexDirection:'row' }}>
|
|
415
414
|
<View transparent nativeID='team_details' style={{ flex:1, padding:5, paddingRight:0 }}>
|
|
416
415
|
<View transparent style={{ flexDirection:'row', alignItems:'center', marginTop:5, marginBottom:5, marginLeft:10 }}>
|
|
417
416
|
{show_stats ?
|
|
@@ -538,7 +537,7 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
538
537
|
<Button
|
|
539
538
|
float
|
|
540
539
|
type='squares'
|
|
541
|
-
style={{ marginRight:
|
|
540
|
+
style={{ marginRight:3, flexDirection:'row', alignItems:'center', padding:10, borderRadius:22 }}
|
|
542
541
|
onPress={() => handleSelectSquares()}>
|
|
543
542
|
<Icons.SquaresIcon size={18} color={C.text.white} />
|
|
544
543
|
<Text style={{ marginLeft:5 }} size={14} color={C.text.white} weight='semibold'>Squares</Text>
|
|
@@ -548,7 +547,7 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
548
547
|
<Button
|
|
549
548
|
float
|
|
550
549
|
type='competition'
|
|
551
|
-
style={{ marginRight:
|
|
550
|
+
style={{ marginRight:3, flexDirection:'row', alignItems:'center', padding:10, borderRadius:22 }}
|
|
552
551
|
onPress={() => handleSelectCompetition()}>
|
|
553
552
|
<Icons.PickEmIcon size={14} color={C.text.white} />
|
|
554
553
|
<Text style={{ marginLeft:5 }} size={14} color={C.text.white} weight='semibold'>MultiPick</Text>
|
|
@@ -566,6 +565,7 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
566
565
|
<Button
|
|
567
566
|
title='MORE'
|
|
568
567
|
type='info'
|
|
568
|
+
style={{ padding:10 }}
|
|
569
569
|
onPress={() => onViewAdditionalMarkets(event.event_id, 'team')}
|
|
570
570
|
/>
|
|
571
571
|
:<></>}
|
|
@@ -21,8 +21,8 @@ const BoardStats = ({ squares_competition, squares, player_squares}:BoardStatsPr
|
|
|
21
21
|
const ownership_pct = active_ps.length / squares.length * 100
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
|
-
<View float style={{ minWidth:350 }}>
|
|
25
|
-
<Button
|
|
24
|
+
<View float style={{ minWidth:350, borderRadius:0 }}>
|
|
25
|
+
<Button style={{ flexDirection:'row', alignItems:'center', backgroundColor:C.views.header, borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
26
26
|
<Icons.PieIcon color={C.text.h1} size={18} />
|
|
27
27
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
28
28
|
<Text theme="h1">BOARD STATS</Text>
|
|
@@ -17,8 +17,8 @@ const EventCard = ({ event, league }:EventCardProps) => {
|
|
|
17
17
|
const overtime_occurred = event.event_scoring && event.event_scoring.length > 4 ? true : false;
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
|
-
<View float style={{ minWidth:350 }}>
|
|
21
|
-
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
20
|
+
<View type='header' float style={{ minWidth:350, borderRadius:0 }}>
|
|
21
|
+
<Button transparent style={{ flexDirection:'row', alignItems:'center', borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
22
22
|
<View transparent style={{ flexDirection:'row', alignItems:'center', paddingRight:5, borderRightWidth:1, borderColor:C.borders.light }}>
|
|
23
23
|
{league ?
|
|
24
24
|
<Image
|
|
@@ -63,7 +63,7 @@ const MySquaresCard = ({ player_squares, squares, away_abbr, home_abbr, square_o
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<View float style={{ minWidth:350 }}>
|
|
66
|
+
<View float style={{ minWidth:350, borderRadius:0 }}>
|
|
67
67
|
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
68
68
|
<View transparent style={{ height:18, width:18, borderRadius:100, backgroundColor:Colors.highlights.highlight200, justifyContent:'center', alignItems:'center' }}>
|
|
69
69
|
<Text size={10} weight='bold' color={Colors.shades.white} textAlign='center'>{player_squares.length}</Text>
|
|
@@ -81,8 +81,8 @@ const MyStatsCard = ({ player_id, squares_expected_value, away_abbr, home_abbr,
|
|
|
81
81
|
if(!isNaN(squares_expected_value.ev_pct)){ ev_pct = squares_expected_value.ev_pct }
|
|
82
82
|
|
|
83
83
|
return (
|
|
84
|
-
<View float
|
|
85
|
-
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
84
|
+
<View float style={{ minWidth:350, borderRadius:0 }}>
|
|
85
|
+
<Button transparent style={{ flexDirection:'row', alignItems:'center', backgroundColor:C.views.header, borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
86
86
|
<View transparent style={{ justifyContent:'center', alignItems:'center' }}>
|
|
87
87
|
<Text size={14} color={squares_expected_value.expected_value > 0 ? C.text.success: C.text.error} weight='bold'>{(ev_pct * 100).toFixed(2)}%</Text>
|
|
88
88
|
<Text style={{ marginTop:3 }} size={12} color={C.text.h1} weight='regular'>EV</Text>
|
|
@@ -66,8 +66,8 @@ const PrizeCard = ({ event, square_prizes, players, squares }:PrizeCardProps) =>
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
|
-
<View float style={{ minWidth:350 }}>
|
|
70
|
-
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
69
|
+
<View float style={{ minWidth:350, borderRadius:0 }}>
|
|
70
|
+
<Button transparent style={{ flexDirection:'row', alignItems:'center', backgroundColor:C.views.header, borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
71
71
|
<Icons.AwardRibbonIcon size={18} color={C.text.gold} />
|
|
72
72
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
73
73
|
<Text theme='h1'>HIDDEN PRIZES</Text>
|
|
@@ -168,6 +168,8 @@ const SquareCard = ({ player_id, square, player_square, event, event_status, mar
|
|
|
168
168
|
if(square_state === 'existing_buy_offer' && player_square?.player_id != player_id){ showSubText = 'OFFER' }
|
|
169
169
|
if(square_state === 'existing_buy_offer' && player_square?.player_id == player_id){ showSubText = 'SELL' }
|
|
170
170
|
if(square_state === 'existing_sell_offer' && player_square?.player_id != player_id){ showSubText = 'BUY' }
|
|
171
|
+
|
|
172
|
+
|
|
171
173
|
return (
|
|
172
174
|
<TouchableOpacity style={{ margin:3, height:40, width:40, borderRadius:4, justifyContent:'center', alignItems:'center', backgroundColor:getSquareBackgroundColor(square_state), borderWidth:getSquareBorderWidth(square_state), borderTopWidth:getSquareBorderTopWidth(square_state), borderColor:getSquareBorderColor(square_state) }} onPress={() => onSquareSelect(square, draft_player_square||draft_square_offer?'remove':'add')}>
|
|
173
175
|
{isUserIconVisible(square_state) ?
|
|
@@ -44,8 +44,8 @@ const SquareOwnersCard = ({ player_squares, players, onPlayerSelect }:SquareOwne
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
|
-
<View float style={{ minWidth:350 }}>
|
|
48
|
-
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
47
|
+
<View float style={{ minWidth:350, borderRadius:0 }}>
|
|
48
|
+
<Button transparent style={{ flexDirection:'row', alignItems:'center', backgroundColor:C.views.header, borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
49
49
|
<Icons.OwnedSquareIcon size={18} color={C.text.h1} />
|
|
50
50
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
51
51
|
<Text theme='h1'>SQUARE OWNERS</Text>
|
|
@@ -100,8 +100,8 @@ const SquaresBoard = ({
|
|
|
100
100
|
if(squares_competition.guaranteed_payout && squares_competition.guaranteed_payout > total_payout){ total_payout = squares_competition.guaranteed_payout }
|
|
101
101
|
|
|
102
102
|
return (
|
|
103
|
-
<View float style={{ minWidth:350, maxWidth:600 }}>
|
|
104
|
-
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
103
|
+
<View float style={{ minWidth:350, maxWidth:600, borderRadius:0 }}>
|
|
104
|
+
<Button transparent style={{ flexDirection:'row', alignItems:'center', backgroundColor:C.views.header, borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
105
105
|
<Icons.SquaresIcon size={18} color={C.text.h1} />
|
|
106
106
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
107
107
|
<Text theme="h1">SQUARES BOARD</Text>
|
|
@@ -126,7 +126,7 @@ const SquaresBoard = ({
|
|
|
126
126
|
</Button>
|
|
127
127
|
{expanded ?
|
|
128
128
|
<View transparent style={{ flex:1 }} nativeID="board">
|
|
129
|
-
<ScrollView horizontal style={{ flexDirection:'row', marginLeft:20 }}>
|
|
129
|
+
<ScrollView horizontal style={{ flexDirection:'row', marginLeft:40, marginTop:20 }}>
|
|
130
130
|
<View transparent>
|
|
131
131
|
<View transparent style={{ flexDirection:'row', marginLeft:4 }}>
|
|
132
132
|
{unique_score_y.map(num => {
|
|
@@ -147,7 +147,7 @@ const SquaresBoard = ({
|
|
|
147
147
|
</View>
|
|
148
148
|
</View>
|
|
149
149
|
</ScrollView>
|
|
150
|
-
<View transparent style={{ position:'absolute', top:
|
|
150
|
+
<View transparent style={{ position:'absolute', top: 45,left:20, backgroundColor:'transparent' }}>
|
|
151
151
|
{unique_score_y.map(num => {
|
|
152
152
|
return (
|
|
153
153
|
<View key={`x_${num}`} style={{ margin:3, justifyContent:'center', alignItems:'center', height:40, width:20, backgroundColor:'transparent' }}>
|
|
@@ -15,8 +15,8 @@ const SquaresDetails = ({ squares_competition, squares_type, squares_payout_type
|
|
|
15
15
|
const C = useColors();
|
|
16
16
|
const [ expanded, setExpanded ] = useState(false);
|
|
17
17
|
return (
|
|
18
|
-
<View float nativeID="competition_details" style={{ minWidth:350 }}>
|
|
19
|
-
<Button transparent style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setExpanded(!expanded)}>
|
|
18
|
+
<View float nativeID="competition_details" style={{ minWidth:350, borderRadius:0 }}>
|
|
19
|
+
<Button transparent style={{ flexDirection:'row', alignItems:'center', backgroundColor:C.views.header, borderRadius:0 }} onPress={() => setExpanded(!expanded)}>
|
|
20
20
|
<Icons.SettingsIcon size={18} color={C.text.h1} />
|
|
21
21
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
22
22
|
<Text theme="h1">COMPETITION DETAILS</Text>
|