be-components 6.3.2 → 6.3.4
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 +13 -0
- package/lib/commonjs/Campaign/api/index.js.map +1 -1
- package/lib/commonjs/Campaign/components/GolferAlert.js +135 -0
- package/lib/commonjs/Campaign/components/GolferAlert.js.map +1 -0
- package/lib/commonjs/Campaign/index.js +810 -2
- package/lib/commonjs/Campaign/index.js.map +1 -1
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js +2 -2
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/commonjs/Components/Jerseys.js +0 -1
- package/lib/commonjs/Components/Jerseys.js.map +1 -1
- package/lib/commonjs/FlashMarket/FlashHolder.js +12 -3
- package/lib/commonjs/FlashMarket/FlashHolder.js.map +1 -1
- package/lib/commonjs/FlashMarket/index.js +4 -2
- package/lib/commonjs/FlashMarket/index.js.map +1 -1
- package/lib/commonjs/Poll/api/index.js +10 -0
- package/lib/commonjs/Poll/api/index.js.map +1 -1
- package/lib/commonjs/Poll/index.js +4 -0
- package/lib/commonjs/Poll/index.js.map +1 -1
- package/lib/commonjs/Wallet/api/index.js +3 -0
- package/lib/commonjs/Wallet/api/index.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountCard.js +2 -2
- package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -1
- package/lib/module/Campaign/api/index.js +13 -0
- package/lib/module/Campaign/api/index.js.map +1 -1
- package/lib/module/Campaign/components/GolferAlert.js +128 -0
- package/lib/module/Campaign/components/GolferAlert.js.map +1 -0
- package/lib/module/Campaign/index.js +812 -4
- package/lib/module/Campaign/index.js.map +1 -1
- package/lib/module/Checkout/components/AccountSummaryCard.js +2 -2
- package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/module/Components/Jerseys.js +0 -1
- package/lib/module/Components/Jerseys.js.map +1 -1
- package/lib/module/FlashMarket/FlashHolder.js +12 -3
- package/lib/module/FlashMarket/FlashHolder.js.map +1 -1
- package/lib/module/FlashMarket/index.js +4 -2
- package/lib/module/FlashMarket/index.js.map +1 -1
- package/lib/module/Poll/api/index.js +10 -0
- package/lib/module/Poll/api/index.js.map +1 -1
- package/lib/module/Poll/index.js +4 -0
- package/lib/module/Poll/index.js.map +1 -1
- package/lib/module/Wallet/api/index.js +3 -0
- package/lib/module/Wallet/api/index.js.map +1 -1
- package/lib/module/Wallet/components/AccountCard.js +2 -2
- package/lib/module/Wallet/components/AccountCard.js.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Campaign/components/GolferAlert.d.ts +10 -0
- package/lib/typescript/lib/commonjs/Campaign/components/GolferAlert.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Campaign/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Campaign/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Jerseys.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/FlashHolder.d.ts +5 -1
- package/lib/typescript/lib/commonjs/FlashMarket/FlashHolder.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/index.d.ts +3 -1
- package/lib/typescript/lib/commonjs/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/Poll/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Poll/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/Campaign/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Campaign/components/GolferAlert.d.ts +10 -0
- package/lib/typescript/lib/module/Campaign/components/GolferAlert.d.ts.map +1 -0
- package/lib/typescript/lib/module/Campaign/index.d.ts +2 -1
- package/lib/typescript/lib/module/Campaign/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Jerseys.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/FlashHolder.d.ts +5 -1
- package/lib/typescript/lib/module/FlashMarket/FlashHolder.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/index.d.ts +3 -1
- package/lib/typescript/lib/module/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/Poll/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/index.d.ts +2 -1
- package/lib/typescript/lib/module/Poll/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/api/index.d.ts +2 -1
- package/lib/typescript/src/Campaign/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Campaign/components/GolferAlert.d.ts +12 -0
- package/lib/typescript/src/Campaign/components/GolferAlert.d.ts.map +1 -0
- package/lib/typescript/src/Campaign/index.d.ts +2 -1
- package/lib/typescript/src/Campaign/index.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/FlashHolder.d.ts +5 -1
- package/lib/typescript/src/FlashMarket/FlashHolder.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/index.d.ts +3 -1
- package/lib/typescript/src/FlashMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/api/index.d.ts +1 -0
- package/lib/typescript/src/Poll/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/index.d.ts +2 -1
- package/lib/typescript/src/Poll/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/api/index.d.ts +1 -0
- package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Campaign/api/index.ts +10 -1
- package/src/Campaign/components/GolferAlert.tsx +74 -0
- package/src/Campaign/index.tsx +435 -10
- package/src/Checkout/components/AccountSummaryCard.tsx +2 -2
- package/src/Components/Jerseys.tsx +1 -1
- package/src/FlashMarket/FlashHolder.tsx +10 -4
- package/src/FlashMarket/index.tsx +5 -3
- package/src/Poll/api/index.ts +8 -0
- package/src/Poll/index.tsx +5 -1
- package/src/Wallet/api/index.ts +3 -0
- package/src/Wallet/components/AccountCard.tsx +2 -2
- package/src/types.d.ts +1 -1
package/src/Campaign/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { FlatList, Image, useWindowDimensions } from "react-native"
|
|
2
|
+
import { ActivityIndicator, FlatList, Image, ImageBackground, useWindowDimensions } from "react-native"
|
|
3
3
|
import { Button, Text, View } from '../Components/Themed';
|
|
4
|
-
import type { AthleteProps, CampaignParticipantProps, CampaignProps, CompetitionProps, EventProps, LeagueProps, MarketProps, MatchProps, OrderAnalyticsProps, OrderProps, PollCampaignProps, PublicPlayerProps, TeamProps, TournamentProps } from '../types';
|
|
4
|
+
import type { AthleteProps, CampaignParticipantProps, CampaignProps, CompanyProps, CompetitionProps, EventProps, LeagueProps, MarketProps, MatchProps, OrderAnalyticsProps, OrderProps, PollCampaignProps, PollOptionProps, PollProps, PublicPlayerProps, TeamProps, TournamentProps } from '../types';
|
|
5
5
|
import { CampaignApi, CampaignHelpers } from '../Campaign/api';
|
|
6
6
|
import { MarketComponentApi } from '../MarketComponents/api';
|
|
7
7
|
import { useColors } from '../constants/useColors';
|
|
@@ -15,12 +15,16 @@ import CampaignAnalytics from './components/CampaignAnalytics';
|
|
|
15
15
|
import SocketManager from '../Socket';
|
|
16
16
|
import NewPlayerAlert from './components/NewPlayerAlert';
|
|
17
17
|
import ActionList from './components/ActionList';
|
|
18
|
-
import { Icons, Toggle } from '../Components';
|
|
18
|
+
import { AutoScrollingFlatList, Icons, Toggle } from '../Components';
|
|
19
|
+
import { PollApi, PollCampaignApi, PollOptionApi } from '../Poll/api';
|
|
20
|
+
import FlashHolder from '../FlashMarket/FlashHolder';
|
|
21
|
+
import GolferAlert from './components/GolferAlert';
|
|
19
22
|
|
|
20
23
|
type CampaignAppProps = {
|
|
21
24
|
player_id?:string,
|
|
22
25
|
campaign_id:string,
|
|
23
26
|
distinct_id:string,
|
|
27
|
+
mode?:'golf',
|
|
24
28
|
color_mode?:'light'|'dark',
|
|
25
29
|
onCreateOrder?:(order:OrderProps) => void,
|
|
26
30
|
action_loading?:boolean,
|
|
@@ -37,9 +41,11 @@ type CampaignAppProps = {
|
|
|
37
41
|
|
|
38
42
|
const HEADER_HEIGHT = 75
|
|
39
43
|
const sections = ['header', 'prize', 'participants', 'toggle', 'desktop_data', 'mobile_ticker', 'mobile_player', 'mobile_leaderboard', 'engagements']
|
|
40
|
-
const
|
|
44
|
+
//const golf_sections = ['header', 'closest_pin', 'sponsors']
|
|
45
|
+
const Campaign = ({ player_id, campaign_id, insets, color_mode, mode, distinct_id, onSelectCompetition, onSelectPollCampaign, onCreateOrder, onViewProfile, onCheckedIn, onCheckedOut, onBetNow }:CampaignAppProps) => {
|
|
41
46
|
const Colors = useColors();
|
|
42
47
|
const [ needs_reload, setNeedsReload ] = useState(false);
|
|
48
|
+
const [ golf_leader_size, setGolfLeaderSize ] = useState({ height:0, width:0 })
|
|
43
49
|
const [ new_player_alert, setNewPlayerAlert ] = useState<CampaignParticipantProps|undefined>(undefined);
|
|
44
50
|
const [ new_bet_alert, setNewBetAlert ] = useState<OrderProps | undefined>(undefined);
|
|
45
51
|
//const [ refresh, setRefresh ] = useState(0);
|
|
@@ -68,12 +74,15 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
68
74
|
action_page:number,
|
|
69
75
|
campaign_participants:CampaignParticipantProps[],
|
|
70
76
|
teams:TeamProps[],
|
|
77
|
+
sponsors:CompanyProps[],
|
|
71
78
|
athletes:AthleteProps[],
|
|
72
79
|
leagues:LeagueProps[],
|
|
73
80
|
tournaments:TournamentProps[],
|
|
74
81
|
matches:MatchProps[],
|
|
75
82
|
markets:MarketProps[],
|
|
76
83
|
poll_campaigns:PollCampaignProps[],
|
|
84
|
+
flash_markets:PollProps[],
|
|
85
|
+
flash_options:PollOptionProps[],
|
|
77
86
|
competitions:CompetitionProps[],
|
|
78
87
|
orders:OrderProps[],
|
|
79
88
|
events:EventProps[],
|
|
@@ -85,6 +94,9 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
85
94
|
leagues:[],
|
|
86
95
|
tournaments:[],
|
|
87
96
|
poll_campaigns: [],
|
|
97
|
+
flash_options: [],
|
|
98
|
+
flash_markets:[],
|
|
99
|
+
sponsors: [],
|
|
88
100
|
competitions: [],
|
|
89
101
|
matches:[],
|
|
90
102
|
athletes:[],
|
|
@@ -95,7 +107,7 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
95
107
|
players:[],
|
|
96
108
|
teams:[]
|
|
97
109
|
});
|
|
98
|
-
const { orders, events, tournaments, athletes, competitions, poll_campaigns, campaign, participant_page, action_page, leagues, campaign_participants, players, teams, } = embed_state;
|
|
110
|
+
const { loading, orders, events, tournaments, flash_options, sponsors, athletes, competitions, flash_markets, poll_campaigns, campaign, participant_page, action_page, leagues, campaign_participants, players, teams, } = embed_state;
|
|
99
111
|
//const visible_orders = orders.sort((a,b) => moment(b.create_datetime).unix() - moment(a.create_datetime).unix()).slice((action_page-1) * 5, ((action_page-1) * 5) + 5)
|
|
100
112
|
useEffect(() => {
|
|
101
113
|
if(!campaign_id){ return }
|
|
@@ -142,7 +154,16 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
142
154
|
plsers = plsers.concat(await CampaignApi.getPlayersByPlayerIds(needed_player_ids));
|
|
143
155
|
//Set new bettor!!
|
|
144
156
|
let new_player = cps.filter(cp => cp.status == 'active')[0]
|
|
145
|
-
if(new_player && new_player.player_id != player_id){ setNewPlayerAlert(new_player) }
|
|
157
|
+
if(mode != 'golf' && new_player && new_player.player_id != player_id){ setNewPlayerAlert(new_player) }
|
|
158
|
+
|
|
159
|
+
if(mode == 'golf'){
|
|
160
|
+
//Old player
|
|
161
|
+
let exist = campaign_participants.find(cp => cp.campaign_participant_id == socket_participants[0]?.campaign_participant_id);
|
|
162
|
+
if(exist?.payload?.status == 'active' && campaign_participants[0]?.payload.status == 'closed'){
|
|
163
|
+
setNewPlayerAlert(new_player);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
146
167
|
//Ok! Now lets update the participants
|
|
147
168
|
setEmbedState({
|
|
148
169
|
...embed_state,
|
|
@@ -197,7 +218,19 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
197
218
|
if(next_participant_page > participant_pages){ next_participant_page = 1 }
|
|
198
219
|
let comps:CompetitionProps[] = []
|
|
199
220
|
let pcs: PollCampaignProps[] = []
|
|
200
|
-
|
|
221
|
+
let fls: PollProps[] = []
|
|
222
|
+
let opts: PollOptionProps[] = []
|
|
223
|
+
if(c_resp.campaign && c_resp.campaign.poll_campaign_ids){
|
|
224
|
+
pcs = await CampaignApi.getPollCampaignsByIds(c_resp.campaign.poll_campaign_ids)
|
|
225
|
+
let campaign_id = pcs[0]?.poll_campaign_id
|
|
226
|
+
if(campaign_id){
|
|
227
|
+
PollCampaignApi.setEnvironment();
|
|
228
|
+
let flash_resp = await PollApi.getPollsByCampaignId(campaign_id);
|
|
229
|
+
fls = flash_resp.polls
|
|
230
|
+
let poll_ids = [ ...new Set(fls.map(p => p.poll_id)) ]
|
|
231
|
+
opts = await PollOptionApi.getPollOptionsByPollIds(poll_ids);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
201
234
|
if(c_resp.campaign && c_resp.campaign.competition_ids){ comps = await CampaignApi.getCompetitionsByIds(c_resp.campaign.competition_ids) }
|
|
202
235
|
|
|
203
236
|
let next_action_page = action_page + 1
|
|
@@ -219,13 +252,16 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
219
252
|
const tms = await MarketComponentApi.getTeamsByIds(tm_ids);
|
|
220
253
|
const aths = await MarketComponentApi.getAthletesByIds(aths_ids);
|
|
221
254
|
const lgs = await MarketComponentApi.getLeagues();
|
|
222
|
-
|
|
255
|
+
const spnsrs = await CampaignApi.getCompaniesByIds(c_resp.campaign?.sponsors ?? [])
|
|
223
256
|
setEmbedState({
|
|
224
257
|
...embed_state,
|
|
225
258
|
players:pls,
|
|
226
259
|
campaign: c_resp.campaign,
|
|
227
260
|
campaign_participants: c_resp.campaign_participants,
|
|
228
261
|
teams: tms,
|
|
262
|
+
sponsors: spnsrs,
|
|
263
|
+
flash_markets: fls,
|
|
264
|
+
flash_options: opts,
|
|
229
265
|
leagues: lgs,
|
|
230
266
|
competitions:comps,
|
|
231
267
|
poll_campaigns: pcs,
|
|
@@ -236,7 +272,10 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
236
272
|
events: evs,
|
|
237
273
|
orders: vis_ords,
|
|
238
274
|
loading:false
|
|
239
|
-
})
|
|
275
|
+
});
|
|
276
|
+
setTimeout(() => {
|
|
277
|
+
getData(campaign_id)
|
|
278
|
+
}, 240000); //Update every 4 minutes
|
|
240
279
|
}
|
|
241
280
|
|
|
242
281
|
const handleCheckIn = async() => {
|
|
@@ -311,6 +350,33 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
311
350
|
)
|
|
312
351
|
}
|
|
313
352
|
|
|
353
|
+
const renderGolfers = (data:{ item:CampaignParticipantProps, index:number }) => {
|
|
354
|
+
const player = players.find(p => p.player_id == data.item.player_id);
|
|
355
|
+
if(!player){ return <></> }
|
|
356
|
+
return (
|
|
357
|
+
<View type='row' style={{ padding:10, borderBottomWidth:1, borderColor:Colors.borders.light }}>
|
|
358
|
+
{data.item.payload.status == 'active' ?
|
|
359
|
+
<Icons.GolferIcon size={16} color={Colors.text.h1} />
|
|
360
|
+
: data.item.payload.status == 'pending' ?
|
|
361
|
+
<Icons.InProgressIcon size={16} color={Colors.text.h1} />
|
|
362
|
+
:
|
|
363
|
+
<Icons.LockClosedIcon size={16} color={Colors.text.h1} />
|
|
364
|
+
}
|
|
365
|
+
<View style={{ flex:1, flexDirection:'row', marginLeft:15 }}>
|
|
366
|
+
<Image
|
|
367
|
+
source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
368
|
+
style={{ height:35, width:35, borderRadius:100}}
|
|
369
|
+
/>
|
|
370
|
+
<View style={{ flex:1, marginLeft:10 }}>
|
|
371
|
+
<Text theme='h1'>{player.first_name} {player.last_name}</Text>
|
|
372
|
+
<Text theme='description' style={{ marginTop:3 }}>@{player.username}</Text>
|
|
373
|
+
</View>
|
|
374
|
+
</View>
|
|
375
|
+
<Text theme='h1'>{data.item.payload.pin_distance == 999 ? 'MISS' : data.item.payload.pin_distance}</Text>
|
|
376
|
+
</View>
|
|
377
|
+
)
|
|
378
|
+
}
|
|
379
|
+
|
|
314
380
|
const renderEngagements = (data:{ item:{ id:string, type:string, scheduled_datetime:Moment }, index:number }) => {
|
|
315
381
|
|
|
316
382
|
switch(data.item.type){
|
|
@@ -360,6 +426,79 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
360
426
|
}
|
|
361
427
|
}
|
|
362
428
|
|
|
429
|
+
const renderUpcomingGolfers = (data: { item:PollProps, index:number }) => {
|
|
430
|
+
const options = flash_options.filter(o => o.poll_id == data.item.poll_id);
|
|
431
|
+
return (
|
|
432
|
+
<View transparent style={{ flexDirection:'row', borderBottomWidth:1, borderColor:Colors.borders.light, borderBottomLeftRadius: 8 }}>
|
|
433
|
+
<View type='header' style={{ padding:20, justifyContent:'center', alignItems:'center', borderRightWidth:1, borderColor:Colors.borders.light }}>
|
|
434
|
+
<Text theme='description' style={{ marginBottom:4 }}>Group</Text>
|
|
435
|
+
<Text theme='h1'>{data.item.priority}</Text>
|
|
436
|
+
</View>
|
|
437
|
+
{options.sort((a,b) => a.priority - b.priority).map(o => {
|
|
438
|
+
return (
|
|
439
|
+
<View transparent style={{ flex:1, justifyContent:'center', alignItems:'center', padding:10, borderRightWidth:1, borderColor:Colors.borders.light }}>
|
|
440
|
+
<Image
|
|
441
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
442
|
+
style={{ height:40, width:40 }}
|
|
443
|
+
resizeMode='cover'
|
|
444
|
+
/>
|
|
445
|
+
<Text theme='h2' style={{ marginTop:4 }} textAlign='center'>{o.option_name}</Text>
|
|
446
|
+
</View>
|
|
447
|
+
)
|
|
448
|
+
})}
|
|
449
|
+
</View>
|
|
450
|
+
)
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const renderClosedGolfers = (data: { item:PollProps, index:number }) => {
|
|
454
|
+
const options = flash_options.filter(o => o.poll_id == data.item.poll_id);
|
|
455
|
+
return (
|
|
456
|
+
<View transparent style={{ flexDirection:'row', borderBottomWidth:1, borderColor:Colors.borders.light, borderBottomLeftRadius: 8 }}>
|
|
457
|
+
<View type='header' style={{ padding:20, justifyContent:'center', alignItems:'center', borderRightWidth:1, borderColor:Colors.borders.light }}>
|
|
458
|
+
<Text theme='description' style={{ marginBottom:4 }}>Group</Text>
|
|
459
|
+
<Text theme='h1'>{data.item.priority}</Text>
|
|
460
|
+
</View>
|
|
461
|
+
{options.sort((a,b) => a.priority - b.priority).map(o => {
|
|
462
|
+
return (
|
|
463
|
+
<View transparent style={{ flex:1, justifyContent:'center', alignItems:'center', padding:10, borderWidth:1, borderColor:o.result_ind=='win' ? Colors.text.success : Colors.borders.light }}>
|
|
464
|
+
<Image
|
|
465
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
466
|
+
style={{ height:50, width:50 }}
|
|
467
|
+
resizeMode='cover'
|
|
468
|
+
/>
|
|
469
|
+
<Text theme='h2' style={{ marginTop:4 }} textAlign='center'>{o.option_name}</Text>
|
|
470
|
+
|
|
471
|
+
</View>
|
|
472
|
+
)
|
|
473
|
+
})}
|
|
474
|
+
</View>
|
|
475
|
+
)
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const renderPastPoll = (data: { item:PollProps, index:number }) => {
|
|
479
|
+
return (
|
|
480
|
+
<View style={{ flexGrow:1, padding:10, flexDirection:'row', alignItems:'center' }}>
|
|
481
|
+
<Text theme='h1'>{data.item.poll_question}</Text>
|
|
482
|
+
</View>
|
|
483
|
+
)
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
const renderSponsors = (data: { item:CompanyProps, index:number }) => {
|
|
487
|
+
return (
|
|
488
|
+
<View float style={{ flexDirection:'row', alignItems:'center', minWidth:300, maxWidth:350, margin:10, padding:10 }}>
|
|
489
|
+
<Image
|
|
490
|
+
source={{ uri: data.item.company_image?.url }}
|
|
491
|
+
style={{ height:60, width:60, backgroundColor:Colors.text.white, borderRadius:8 }}
|
|
492
|
+
resizeMode='center'
|
|
493
|
+
/>
|
|
494
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
495
|
+
<Text theme='h1'>{data.item.company_name}</Text>
|
|
496
|
+
<Text theme='description' style={{ marginTop:4 }}>{data.item.company_description}</Text>
|
|
497
|
+
</View>
|
|
498
|
+
</View>
|
|
499
|
+
)
|
|
500
|
+
}
|
|
501
|
+
|
|
363
502
|
const renderSections = (data:{ item:string, index:number }) => {
|
|
364
503
|
switch(data.item){
|
|
365
504
|
case 'header':
|
|
@@ -389,6 +528,92 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
389
528
|
:<></>}
|
|
390
529
|
</View>
|
|
391
530
|
)
|
|
531
|
+
case 'closest_pin':
|
|
532
|
+
const active_poll = flash_markets[0]//.find(m => m.flash_active);
|
|
533
|
+
const next_three = flash_markets.filter(m => m.priority > (active_poll?.priority??0)).sort((a,b) => a.priority - b.priority).slice(0,3);
|
|
534
|
+
return (
|
|
535
|
+
<View style={{ flexDirection:'row', flexWrap:'wrap' }}>
|
|
536
|
+
<View nativeID='pin_leaderboard' style={{ flex:1, minWidth:400 }}>
|
|
537
|
+
<View>
|
|
538
|
+
<Image
|
|
539
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1752434537/a95a5b63614b60844f9612cce6cc985a2ed2879c-1600x1067_bfgn61.jpg' }}
|
|
540
|
+
style={{ height:400*0.6725, width:400 }}
|
|
541
|
+
resizeMode='cover'
|
|
542
|
+
/>
|
|
543
|
+
</View>
|
|
544
|
+
</View>
|
|
545
|
+
<View style={{ minWidth:400 }}>
|
|
546
|
+
<FlatList
|
|
547
|
+
data={campaign_participants.filter(cp => cp.status == 'active').sort((a,b) => parseFloat((a.payload.pin_distance ?? 9999)) - parseFloat((b.payload.pin_distance ?? 9999)))}
|
|
548
|
+
key={'closed_pin_leaders'}
|
|
549
|
+
keyExtractor={(item) => item.campaign_participant_id}
|
|
550
|
+
renderItem={renderGolfers}
|
|
551
|
+
/>
|
|
552
|
+
</View>
|
|
553
|
+
<View nativeID='flash' style={{ flex:4, borderLeftWidth:1, borderColor:Colors.borders.light }}>
|
|
554
|
+
<View type='body' style={{ flex:1 }}>
|
|
555
|
+
<View style={{ flexDirection:'row', flex:1 }}>
|
|
556
|
+
<View style={{ flex:1 }}>
|
|
557
|
+
|
|
558
|
+
{active_poll ?
|
|
559
|
+
<FlashHolder
|
|
560
|
+
poll_id={active_poll?.poll_id}
|
|
561
|
+
init_expanded
|
|
562
|
+
hide_tabs
|
|
563
|
+
onRequestAuthenticate={() => console.log('')}
|
|
564
|
+
onRequestLocation={() => console.log('')}
|
|
565
|
+
onFocusPosition={() => console.log('')}
|
|
566
|
+
/>
|
|
567
|
+
:<></>}
|
|
568
|
+
</View>
|
|
569
|
+
<View style={{ flex:1, borderLeftWidth:1, borderColor:Colors.borders.light }}>
|
|
570
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
571
|
+
<View transparent style={{ flex:1 }}>
|
|
572
|
+
<Text theme='h1'>Upcoming Groups</Text>
|
|
573
|
+
<Text theme='description' style={{ marginTop:8 }}>Bet on who will get closest to the pin!</Text>
|
|
574
|
+
</View>
|
|
575
|
+
</View>
|
|
576
|
+
<View>
|
|
577
|
+
{next_three.map((p,i) => {
|
|
578
|
+
return renderUpcomingGolfers({ item: p, index:i })
|
|
579
|
+
})}
|
|
580
|
+
</View>
|
|
581
|
+
</View>
|
|
582
|
+
</View>
|
|
583
|
+
</View>
|
|
584
|
+
</View>
|
|
585
|
+
</View>
|
|
586
|
+
)
|
|
587
|
+
case 'last_ones':
|
|
588
|
+
const past_three = flash_markets.filter(m => m.priority > (active_poll?.priority??0)).sort((a,b) => b.priority - a.priority).slice(0,5);
|
|
589
|
+
return (
|
|
590
|
+
<View style={{ flex:1, borderLeftWidth:1, borderColor:Colors.borders.light }}>
|
|
591
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
592
|
+
<View transparent style={{ flex:1 }}>
|
|
593
|
+
<Text theme='h1'>Upcoming Groups</Text>
|
|
594
|
+
<Text theme='description' style={{ marginTop:8 }}>Bet on who will get closest to the pin!</Text>
|
|
595
|
+
</View>
|
|
596
|
+
</View>
|
|
597
|
+
{past_three.map((p,i) => {
|
|
598
|
+
return renderPastPoll({ item: p, index:i })
|
|
599
|
+
})}
|
|
600
|
+
</View>
|
|
601
|
+
)
|
|
602
|
+
case 'sponsors':
|
|
603
|
+
return (
|
|
604
|
+
<View style={{ padding:10, borderTopWidth:1, borderColor:Colors.borders.light }}>
|
|
605
|
+
<View>
|
|
606
|
+
<Text theme='h1'>Sponsors</Text>
|
|
607
|
+
<Text theme='description' style={{ marginTop:4 }}>A massive thank you to all the amazing sponsors</Text>
|
|
608
|
+
</View>
|
|
609
|
+
<AutoScrollingFlatList
|
|
610
|
+
data={sponsors}
|
|
611
|
+
renderItem={renderSponsors}
|
|
612
|
+
horizontal
|
|
613
|
+
speed={50}
|
|
614
|
+
/>
|
|
615
|
+
</View>
|
|
616
|
+
)
|
|
392
617
|
case 'prize':
|
|
393
618
|
if(!campaign?.prize_description){ return <></> }
|
|
394
619
|
return (
|
|
@@ -528,6 +753,207 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
528
753
|
const new_bet_event = events.find(e => e.event_id == new_bet_alert?.event_id);
|
|
529
754
|
const new_bet_tournament = tournaments.find(t => t.tournament_id == new_bet_alert?.event_id);
|
|
530
755
|
const new_bet_league = new_bet_event ? leagues.find(l => l.league_id == new_bet_event.league_id) : leagues.find(l => l.league_id == new_bet_tournament?.league_id);
|
|
756
|
+
|
|
757
|
+
if(mode == 'golf'){
|
|
758
|
+
const active_poll = flash_markets.filter(m => ['paused','active'].includes(m.status)).sort((a,b) => a.priority - b.priority)[0]
|
|
759
|
+
const next_three = flash_markets.filter(m => m.priority > (active_poll?.priority??0)).sort((a,b) => a.priority - b.priority).slice(0,3);
|
|
760
|
+
const past_three = flash_markets.filter(m => m.status == 'closed').sort((a,b) => b.priority - a.priority).slice(0,3)
|
|
761
|
+
const active_participant = campaign_participants.find(cp => cp.payload.status == 'active');
|
|
762
|
+
const active_golfer = players.find(p => p.player_id == active_participant?.player_id);
|
|
763
|
+
return (
|
|
764
|
+
<View style={{ flex:1 }}>
|
|
765
|
+
<ImageBackground
|
|
766
|
+
style={{ flex:1 }}
|
|
767
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1752434537/a95a5b63614b60844f9612cce6cc985a2ed2879c-1600x1067_bfgn61.jpg' }}
|
|
768
|
+
>
|
|
769
|
+
<View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0 }} />
|
|
770
|
+
<View transparent style={{flex:1, flexDirection:'row' }}>
|
|
771
|
+
<View transparent style={{ flex:2, margin:10, minWidth:350 }} onLayout={(ev) => {
|
|
772
|
+
const { height, width } = ev.nativeEvent.layout;
|
|
773
|
+
setGolfLeaderSize({ height, width: width -2 });
|
|
774
|
+
}}>
|
|
775
|
+
<View float style={{ flex:1 }}>
|
|
776
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
777
|
+
<View transparent style={{ flex:1 }}>
|
|
778
|
+
<Text theme='h1'>On the Tee Now!</Text>
|
|
779
|
+
<Text theme='description'>Below are the current betting probabilities for the group on the tee!</Text>
|
|
780
|
+
</View>
|
|
781
|
+
</View>
|
|
782
|
+
<View style={{ flex:1 }}>
|
|
783
|
+
{active_poll ?
|
|
784
|
+
<FlashHolder
|
|
785
|
+
poll_id={active_poll?.poll_id}
|
|
786
|
+
init_expanded
|
|
787
|
+
hide_tabs
|
|
788
|
+
hide_timer
|
|
789
|
+
hide_footer
|
|
790
|
+
no_highlight
|
|
791
|
+
onRequestAuthenticate={() => console.log('')}
|
|
792
|
+
onRequestLocation={() => console.log('')}
|
|
793
|
+
onFocusPosition={() => console.log('')}
|
|
794
|
+
/>
|
|
795
|
+
:<></>}
|
|
796
|
+
</View>
|
|
797
|
+
<View transparent>
|
|
798
|
+
<Image
|
|
799
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1752434537/a95a5b63614b60844f9612cce6cc985a2ed2879c-1600x1067_bfgn61.jpg' }}
|
|
800
|
+
style={{ height:golf_leader_size.width*0.6725, width:golf_leader_size.width, alignSelf:'center', borderBottomRightRadius:8, borderBottomLeftRadius:8 }}
|
|
801
|
+
/>
|
|
802
|
+
<View transparent style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
|
|
803
|
+
<View float style={{ padding:20 }}>
|
|
804
|
+
<Text theme='h2' textAlign='center'>Windsong Farm South Course</Text>
|
|
805
|
+
<Text theme='h1' style={{ marginTop:10 }} textAlign='center'>Hole 16</Text>
|
|
806
|
+
<View transparent style={{ marginTop:10, padding:10, justifyContent:'center', alignItems:'center' }}>
|
|
807
|
+
<QRCode
|
|
808
|
+
value={`https://play.bettoredge.com/social/campaign/${campaign_id}`}
|
|
809
|
+
size={100}
|
|
810
|
+
style={{ backgroundColor:'transparent' }}
|
|
811
|
+
/>
|
|
812
|
+
</View>
|
|
813
|
+
</View>
|
|
814
|
+
|
|
815
|
+
</View>
|
|
816
|
+
</View>
|
|
817
|
+
</View>
|
|
818
|
+
</View>
|
|
819
|
+
<View float style={{ flex:3, minWidth:350, margin:10 }}>
|
|
820
|
+
<View type='header' style={{ padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
821
|
+
<View transparent style={{ flex:1 }}>
|
|
822
|
+
<Text theme='h1'>Closest to the hole #16</Text>
|
|
823
|
+
</View>
|
|
824
|
+
</View>
|
|
825
|
+
{active_golfer ?
|
|
826
|
+
<View style={{ backgroundColor:Colors.views.gold, padding:10 }}>
|
|
827
|
+
<Text theme='h2'>Now On The Tee</Text>
|
|
828
|
+
<View transparent style={{ flexDirection:'row', marginTop:5}}>
|
|
829
|
+
<Image
|
|
830
|
+
source={{ uri: active_golfer.profile_pic && active_golfer.profile_pic != '' ? active_golfer.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
831
|
+
style={{ height:35, width:35, borderRadius:100}}
|
|
832
|
+
/>
|
|
833
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
834
|
+
<Text theme='h1' color={Colors.text.white}>{active_golfer.first_name} {active_golfer.last_name}</Text>
|
|
835
|
+
<Text theme='description' style={{ marginTop:3 }}>@{active_golfer.username}</Text>
|
|
836
|
+
</View>
|
|
837
|
+
<Icons.GolferIcon size={28} color={Colors.text.white} />
|
|
838
|
+
</View>
|
|
839
|
+
</View>
|
|
840
|
+
:<></>}
|
|
841
|
+
<View style={{ flex:1, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
842
|
+
<View style={{ flexDirection:'row' }}>
|
|
843
|
+
<View transparent style={{ padding:10 }}>
|
|
844
|
+
<Text theme='h1'>LEADERBOARD</Text>
|
|
845
|
+
<Text theme='description' style={{ marginTop:4 }}>Closest to the pin - distance in feet from the pin</Text>
|
|
846
|
+
</View>
|
|
847
|
+
{loading ?
|
|
848
|
+
<ActivityIndicator color={Colors.text.h1} size={14} />
|
|
849
|
+
:<></>}
|
|
850
|
+
</View>
|
|
851
|
+
|
|
852
|
+
<FlatList
|
|
853
|
+
data={campaign_participants.filter(cp => cp.status == 'active').sort((a,b) => parseFloat((a.payload.pin_distance ? a.payload.pin_distance : 9999)) - parseFloat((b.payload.pin_distance ? b.payload.pin_distance : 9999)))}
|
|
854
|
+
key={'closed_pin_leaders'}
|
|
855
|
+
keyExtractor={(item) => item.campaign_participant_id}
|
|
856
|
+
renderItem={renderGolfers}
|
|
857
|
+
/>
|
|
858
|
+
</View>
|
|
859
|
+
<View type='header' style={{ padding:10, borderTopWidth:1, borderColor:Colors.borders.light, overflow:'hidden', borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
860
|
+
<View transparent>
|
|
861
|
+
<Text theme='h1'>Sponsors</Text>
|
|
862
|
+
<Text theme='h2' style={{ marginTop:4 }}>A massive thank you to all the amazing sponsors</Text>
|
|
863
|
+
</View>
|
|
864
|
+
<AutoScrollingFlatList
|
|
865
|
+
data={sponsors}
|
|
866
|
+
renderItem={renderSponsors}
|
|
867
|
+
horizontal
|
|
868
|
+
speed={20}
|
|
869
|
+
/>
|
|
870
|
+
</View>
|
|
871
|
+
</View>
|
|
872
|
+
<View transparent style={{ flex:4 }}>
|
|
873
|
+
<View float nativeID='next_up' style={{ flexGrow:1, margin:10 }}>
|
|
874
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
875
|
+
<Icons.GolferIcon size={28} color={Colors.text.h1} />
|
|
876
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
877
|
+
<Text theme='h1'>Upcoming Groups</Text>
|
|
878
|
+
<Text theme='description' style={{ marginTop:3 }}>Groups that are soon to be up!</Text>
|
|
879
|
+
</View>
|
|
880
|
+
</View>
|
|
881
|
+
<View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
882
|
+
<FlatList
|
|
883
|
+
data={next_three.sort((a,b) => a.priority - b.priority)}
|
|
884
|
+
renderItem={renderUpcomingGolfers}
|
|
885
|
+
key={'next_up'}
|
|
886
|
+
keyExtractor={(item) => item.poll_id.toString()}
|
|
887
|
+
/>
|
|
888
|
+
</View>
|
|
889
|
+
</View>
|
|
890
|
+
<View float nativeID='past' style={{ flexGrow:1, margin:10 }}>
|
|
891
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
892
|
+
<Icons.GolferIcon size={28} color={Colors.text.h1} />
|
|
893
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
894
|
+
<Text theme='h1'>Recently Completed Groups</Text>
|
|
895
|
+
<Text theme='description' style={{ marginTop:3 }}>Winners from past groups!</Text>
|
|
896
|
+
</View>
|
|
897
|
+
</View>
|
|
898
|
+
<View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
899
|
+
<FlatList
|
|
900
|
+
data={past_three.sort((a,b) => b.priority - a.priority)}
|
|
901
|
+
renderItem={renderClosedGolfers}
|
|
902
|
+
key={'past_up'}
|
|
903
|
+
keyExtractor={(item) => item.poll_id.toString()}
|
|
904
|
+
/>
|
|
905
|
+
</View>
|
|
906
|
+
</View>
|
|
907
|
+
{campaign ?
|
|
908
|
+
<View type='header' style={{ margin:10, flexDirection:'row', alignItems:'center', padding:10, borderRadius:8 }}>
|
|
909
|
+
|
|
910
|
+
<Image
|
|
911
|
+
source={{ uri: campaign.campaign_image?.url }}
|
|
912
|
+
style={{ height:80, width:80, borderRadius:8 }}
|
|
913
|
+
resizeMode='center'
|
|
914
|
+
/>
|
|
915
|
+
<View transparent style={{ flex:1, marginLeft:20 }}>
|
|
916
|
+
<Text theme='h1' size={18}>{campaign.campaign_name}</Text>
|
|
917
|
+
<Text theme='description' style={{ marginTop:4 }}>{campaign.description}</Text>
|
|
918
|
+
</View>
|
|
919
|
+
|
|
920
|
+
</View>
|
|
921
|
+
:<></>}
|
|
922
|
+
</View>
|
|
923
|
+
|
|
924
|
+
</View>
|
|
925
|
+
</ImageBackground>
|
|
926
|
+
{new_player_alert && new_player ?
|
|
927
|
+
<View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0, alignItems:'center', paddingTop:100 }}>
|
|
928
|
+
<GolferAlert
|
|
929
|
+
campaign_participant={new_player_alert}
|
|
930
|
+
player={new_player}
|
|
931
|
+
view_mode={view_mode}
|
|
932
|
+
onViewProfile={onViewProfile}
|
|
933
|
+
onClose={() => setNewPlayerAlert(undefined)}
|
|
934
|
+
/>
|
|
935
|
+
</View>
|
|
936
|
+
:<></>}
|
|
937
|
+
<SocketManager
|
|
938
|
+
onConnect={() => {
|
|
939
|
+
if(!needs_reload){ return }
|
|
940
|
+
}}
|
|
941
|
+
onDisconnect={() => setNeedsReload(true)}
|
|
942
|
+
subscribed_events={['UPDATE_CAMPAIGN_PARTICIPANTS']}
|
|
943
|
+
onSocketEvent={(event) => {
|
|
944
|
+
switch(event.type){
|
|
945
|
+
case 'UPDATE_CAMPAIGN_PARTICIPANTS':
|
|
946
|
+
let this_participants = event.campaign_participants.filter((cp:CampaignParticipantProps) => cp.campaign_id == campaign_id);
|
|
947
|
+
if(this_participants.length == 0){ return }
|
|
948
|
+
return setSocketParticipants(event.campaign_participants);
|
|
949
|
+
default: return
|
|
950
|
+
}
|
|
951
|
+
}}
|
|
952
|
+
/>
|
|
953
|
+
</View>
|
|
954
|
+
)
|
|
955
|
+
}
|
|
956
|
+
|
|
531
957
|
return (
|
|
532
958
|
<View style={{ flex:1 }}>
|
|
533
959
|
<View style={{ flex:1 }}>
|
|
@@ -597,7 +1023,6 @@ const Campaign = ({ player_id, campaign_id, insets, color_mode, distinct_id, onS
|
|
|
597
1023
|
<SocketManager
|
|
598
1024
|
onConnect={() => {
|
|
599
1025
|
if(!needs_reload){ return }
|
|
600
|
-
console.log('GET DATA!!!`')
|
|
601
1026
|
}}
|
|
602
1027
|
onDisconnect={() => setNeedsReload(true)}
|
|
603
1028
|
subscribed_events={['UPDATE_CAMPAIGN_PARTICIPANTS']}
|
|
@@ -3,9 +3,9 @@ import { Image } from "react-native";
|
|
|
3
3
|
import { Checkbox, Icons } from '../../Components';
|
|
4
4
|
import type { AccountProps, FocusPositionProps, ItemProps, PlayerAddressProps } from '../../types';
|
|
5
5
|
import { CheckoutApi, CheckoutHelpers } from '../api';
|
|
6
|
-
import moment from 'moment-mini';
|
|
7
6
|
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
8
7
|
import { useColors } from '../../constants/useColors';
|
|
8
|
+
import { WalletHelpers } from '../../Wallet/api';
|
|
9
9
|
|
|
10
10
|
type AccountSummaryCardProps = {
|
|
11
11
|
selected_account?:AccountProps,
|
|
@@ -127,7 +127,7 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
|
|
|
127
127
|
<View style={{ flex:1, marginRight:5 }}>
|
|
128
128
|
<Text size={14} weight='bold'>{selected_account.account_label}</Text>
|
|
129
129
|
{selected_account.account_type == 'card' && selected_account.card_detail ?
|
|
130
|
-
<Text style={{ marginTop:3 }} size={12} color={Colors.text.descriptionLight}>EXP: {
|
|
130
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.text.descriptionLight}>EXP: {WalletHelpers.formateTimeToExpireDate(selected_account.card_detail.expiration_date)}</Text>
|
|
131
131
|
:<></>}
|
|
132
132
|
</View>
|
|
133
133
|
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
@@ -71,7 +71,7 @@ const TeamImage = ({ team, league , size} : TeamImageProps) => {
|
|
|
71
71
|
let image_size = size ?? 20
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
|
-
<View style={{
|
|
74
|
+
<View style={{ alignSelf:'center', justifyContent:'center', alignItems:'center', borderRadius:100, backgroundColor:Colors.shades.white }}>
|
|
75
75
|
{team.image?.url ?
|
|
76
76
|
<RN_Image source={{ uri: team.image.url }} style={{ height:image_size * 2, width:image_size * 2, borderRadius:100 }} resizeMode='center'/>
|
|
77
77
|
|