be-components 3.4.2 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Components/Icons.js +30 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/SearchBox.js +17 -23
- package/lib/commonjs/Components/SearchBox.js.map +1 -1
- package/lib/commonjs/Components/Themed.js +2 -2
- package/lib/commonjs/Components/Themed.js.map +1 -1
- package/lib/commonjs/Engage/components/BracketCompetitionCard.js +75 -58
- package/lib/commonjs/Engage/components/BracketCompetitionCard.js.map +1 -1
- package/lib/commonjs/Engage/components/CompanyCard.js +31 -26
- package/lib/commonjs/Engage/components/CompanyCard.js.map +1 -1
- package/lib/commonjs/Engage/components/CompetitionCard.js +85 -68
- package/lib/commonjs/Engage/components/CompetitionCard.js.map +1 -1
- package/lib/commonjs/Engage/components/EngageHeader.js +62 -36
- package/lib/commonjs/Engage/components/EngageHeader.js.map +1 -1
- package/lib/commonjs/Engage/components/PrivateCodePrompt.js +47 -45
- package/lib/commonjs/Engage/components/PrivateCodePrompt.js.map +1 -1
- package/lib/commonjs/Engage/components/SquaresCompetitionCard.js +69 -56
- package/lib/commonjs/Engage/components/SquaresCompetitionCard.js.map +1 -1
- package/lib/commonjs/Engage/index.js +262 -259
- package/lib/commonjs/Engage/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +69 -46
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/constants/styles.js +1 -1
- package/lib/commonjs/constants/styles.js.map +1 -1
- package/lib/commonjs/constants/useColors.js +6 -3
- package/lib/commonjs/constants/useColors.js.map +1 -1
- package/lib/module/Components/Icons.js +30 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/SearchBox.js +11 -17
- package/lib/module/Components/SearchBox.js.map +1 -1
- package/lib/module/Components/Themed.js +2 -2
- package/lib/module/Components/Themed.js.map +1 -1
- package/lib/module/Engage/components/BracketCompetitionCard.js +52 -35
- package/lib/module/Engage/components/BracketCompetitionCard.js.map +1 -1
- package/lib/module/Engage/components/CompanyCard.js +27 -21
- package/lib/module/Engage/components/CompanyCard.js.map +1 -1
- package/lib/module/Engage/components/CompetitionCard.js +57 -40
- package/lib/module/Engage/components/CompetitionCard.js.map +1 -1
- package/lib/module/Engage/components/EngageHeader.js +53 -27
- package/lib/module/Engage/components/EngageHeader.js.map +1 -1
- package/lib/module/Engage/components/PrivateCodePrompt.js +36 -33
- package/lib/module/Engage/components/PrivateCodePrompt.js.map +1 -1
- package/lib/module/Engage/components/SquaresCompetitionCard.js +51 -38
- package/lib/module/Engage/components/SquaresCompetitionCard.js.map +1 -1
- package/lib/module/Engage/index.js +262 -259
- package/lib/module/Engage/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +69 -46
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/constants/styles.js +1 -1
- package/lib/module/constants/styles.js.map +1 -1
- package/lib/module/constants/useColors.js +6 -3
- package/lib/module/constants/useColors.js.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/SearchBox.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/CompanyCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/CompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/EngageHeader.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/PrivateCodePrompt.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Engage/components/PrivateCodePrompt.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/SquaresCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Engage/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/constants/styles.d.ts +1 -1
- package/lib/typescript/lib/commonjs/constants/useColors.d.ts +5 -4
- package/lib/typescript/lib/commonjs/constants/useColors.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/SearchBox.d.ts +1 -2
- package/lib/typescript/lib/module/Components/SearchBox.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/BracketCompetitionCard.d.ts +1 -2
- package/lib/typescript/lib/module/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/CompanyCard.d.ts +1 -2
- package/lib/typescript/lib/module/Engage/components/CompanyCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/CompetitionCard.d.ts +1 -2
- package/lib/typescript/lib/module/Engage/components/CompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts +1 -2
- package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/PrivateCodePrompt.d.ts +2 -4
- package/lib/typescript/lib/module/Engage/components/PrivateCodePrompt.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/SquaresCompetitionCard.d.ts +1 -2
- package/lib/typescript/lib/module/Engage/components/SquaresCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/index.d.ts +3 -3
- package/lib/typescript/lib/module/Engage/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/constants/useColors.d.ts +71 -0
- package/lib/typescript/lib/module/constants/useColors.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +1 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/SearchBox.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/CompanyCard.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/CompetitionCard.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/EngageHeader.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/PrivateCodePrompt.d.ts +1 -2
- package/lib/typescript/src/Engage/components/PrivateCodePrompt.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/SquaresCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/src/Engage/index.d.ts +5 -1
- package/lib/typescript/src/Engage/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/useColors.d.ts +71 -0
- package/lib/typescript/src/constants/useColors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Components/Icons.tsx +16 -0
- package/src/Components/SearchBox.tsx +11 -13
- package/src/Components/Themed.tsx +3 -3
- package/src/Engage/components/BracketCompetitionCard.tsx +34 -31
- package/src/Engage/components/CompanyCard.tsx +17 -19
- package/src/Engage/components/CompetitionCard.tsx +40 -35
- package/src/Engage/components/EngageHeader.tsx +30 -29
- package/src/Engage/components/PrivateCodePrompt.tsx +29 -33
- package/src/Engage/components/SquaresCompetitionCard.tsx +33 -29
- package/src/Engage/index.tsx +191 -187
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +55 -44
- package/src/constants/styles.ts +1 -1
- package/src/constants/useColors.tsx +7 -5
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { View } from "react-native"
|
|
3
2
|
import type { BracketCompetitionProps, CompetitionProps, CompetitionSeasonProps, SquaresCompetitionProps } from '../../types';
|
|
4
|
-
import {
|
|
5
|
-
import { Button, Icons, Text, TextInput } from '../../Components';
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
3
|
+
import { Icons } from '../../Components';
|
|
7
4
|
import { EngageApi } from '../api';
|
|
5
|
+
import { useColors } from '../../constants/useColors';
|
|
6
|
+
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
8
7
|
|
|
9
8
|
type PrivateCodePromptProps = {
|
|
10
|
-
width:number,
|
|
11
9
|
onFoundCompetition:(c:CompetitionProps) => void,
|
|
12
10
|
onFoundSquaresCompetition:(sc:SquaresCompetitionProps) => void,
|
|
13
11
|
onFoundSeason:(cs:CompetitionSeasonProps) => void,
|
|
@@ -15,7 +13,7 @@ type PrivateCodePromptProps = {
|
|
|
15
13
|
onClose:() => void
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
const PrivateCodePrompt = ({
|
|
16
|
+
const PrivateCodePrompt = ({ onFoundCompetition, onFoundSquaresCompetition, onFoundSeason, onFoundBracket, onClose }:PrivateCodePromptProps) => {
|
|
19
17
|
const [ search, setSearch ] = useState<{
|
|
20
18
|
loading:boolean,
|
|
21
19
|
value: string,
|
|
@@ -26,6 +24,8 @@ const PrivateCodePrompt = ({ width, onFoundCompetition, onFoundSquaresCompetitio
|
|
|
26
24
|
const [ error, setError ] = useState<string|undefined>();
|
|
27
25
|
const { loading, value } = search;
|
|
28
26
|
|
|
27
|
+
const Colors = useColors();
|
|
28
|
+
|
|
29
29
|
const handleSearch = async() => {
|
|
30
30
|
setSearch({ ...search, loading:true });
|
|
31
31
|
const result = await EngageApi.getPrivateEngage(value);
|
|
@@ -39,50 +39,46 @@ const PrivateCodePrompt = ({ width, onFoundCompetition, onFoundSquaresCompetitio
|
|
|
39
39
|
|
|
40
40
|
const search_valid = value ? true : false
|
|
41
41
|
return (
|
|
42
|
-
<View style={{
|
|
43
|
-
<View style={{
|
|
44
|
-
<Icons.SearchIcon color={Colors.
|
|
45
|
-
<View style={{ flex:1, marginLeft:10 }}>
|
|
46
|
-
<Text theme='
|
|
42
|
+
<View float style={{ margin:10 }}>
|
|
43
|
+
<View type='header' style={{ padding:15, flexDirection:'row', alignItems:'center', borderTopRightRadius:8, borderTopLeftRadius:8}}>
|
|
44
|
+
<Icons.SearchIcon color={Colors.text.h1} size={20}/>
|
|
45
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
46
|
+
<Text theme='h1'>Find Private Competition!</Text>
|
|
47
47
|
</View>
|
|
48
48
|
</View>
|
|
49
|
-
<View style={{
|
|
50
|
-
<View style={{ borderRadius:8,
|
|
51
|
-
<Text size={18} color={Colors.
|
|
52
|
-
<Text style={{ marginTop:10 }} size={14} color={Colors.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
<View style={{ padding:10 }}>
|
|
50
|
+
<View style={{ borderRadius:8, padding:10 }}>
|
|
51
|
+
<Text size={18} color={Colors.text.h1} textAlign='center' theme='h1'>Did you receive a private code?</Text>
|
|
52
|
+
<Text style={{ marginTop:10 }} size={14} color={Colors.text.h1} textAlign='center' weight='regular'>Enter the code in the input section below and press FIND. If we find the competition / squares / bracket, we will send you to it!</Text>
|
|
53
|
+
<View type='input' style={{ marginTop:10 }}>
|
|
54
|
+
<TextInput
|
|
55
|
+
placeholder='Enter Private Code'
|
|
56
|
+
style={{ textAlign:'center' }}
|
|
57
|
+
onChangeText={(text) => {
|
|
58
|
+
if(error){ setError(undefined) }
|
|
59
|
+
setSearch({ ...search, value:text })
|
|
60
|
+
}}
|
|
61
|
+
/>
|
|
62
|
+
</View>
|
|
63
63
|
{error?
|
|
64
64
|
<View style={{ marginTop:10, padding:10 }}>
|
|
65
|
-
<Text size={14} color={Colors.
|
|
65
|
+
<Text size={14} color={Colors.text.error} weight='bold' textAlign='center'>{error}</Text>
|
|
66
66
|
</View>
|
|
67
67
|
:<></>}
|
|
68
68
|
</View>
|
|
69
69
|
</View>
|
|
70
|
-
<View style={{
|
|
70
|
+
<View type='footer' style={{ flexDirection:'row', padding:10, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
71
71
|
<Button
|
|
72
72
|
title='CANCEL'
|
|
73
|
-
|
|
74
|
-
title_color={Colors.shades.white}
|
|
73
|
+
type='close'
|
|
75
74
|
style={{ marginRight:5 }}
|
|
76
|
-
padding={15}
|
|
77
75
|
onPress={() => onClose()}
|
|
78
76
|
/>
|
|
79
77
|
<Button
|
|
80
78
|
style={{ flex:1, opacity:search_valid&&!loading?1:0.5 }}
|
|
81
|
-
padding={15}
|
|
82
79
|
disabled={loading || !search_valid}
|
|
83
80
|
loading={loading}
|
|
84
|
-
|
|
85
|
-
title_color={Colors.shades.white}
|
|
81
|
+
type='success'
|
|
86
82
|
title='FIND'
|
|
87
83
|
onPress={async() => handleSearch()}
|
|
88
84
|
/>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Image
|
|
3
|
-
import {
|
|
4
|
-
import { Icons, Text } from '../../Components';
|
|
5
|
-
import Colors from '../../constants/colors';
|
|
2
|
+
import { Image } from 'react-native';
|
|
3
|
+
import { Icons } from '../../Components';
|
|
6
4
|
import type { CompanyProps, EventProps, PublicPlayerProps, SquaresCompetitionProps } from '../../types';
|
|
7
5
|
import moment from 'moment-mini';
|
|
6
|
+
import { useColors } from '../../constants/useColors';
|
|
7
|
+
import { Button, View, Text } from '../../Components/Themed';
|
|
8
8
|
|
|
9
9
|
type SquaresCompetitionCardProps = {
|
|
10
10
|
squares_competition:SquaresCompetitionProps,
|
|
@@ -13,55 +13,57 @@ type SquaresCompetitionCardProps = {
|
|
|
13
13
|
company?:CompanyProps,
|
|
14
14
|
onSelectCompetition:(sq:SquaresCompetitionProps) => void
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
const SquaresCompetitionCard = ({ squares_competition, admin, event, company, onSelectCompetition }:SquaresCompetitionCardProps) => {
|
|
18
|
+
const Colors = useColors()
|
|
18
19
|
let current_payout = squares_competition.potential_winnings
|
|
19
20
|
if(squares_competition.guaranteed_payout && squares_competition.guaranteed_payout > current_payout){ current_payout = squares_competition.guaranteed_payout }
|
|
20
21
|
const is_live = moment().isAfter(moment(squares_competition.begin_datetime)) ? true : false
|
|
22
|
+
const is_closed = squares_competition.complete_ind ? true : false
|
|
21
23
|
return (
|
|
22
|
-
<
|
|
23
|
-
<View style={{
|
|
24
|
+
<Button float style={{ padding:0 }} onPress={() => onSelectCompetition(squares_competition)}>
|
|
25
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
24
26
|
<Image
|
|
25
27
|
source={{ uri: squares_competition.image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
26
28
|
style={{ height:45, width:45, borderRadius:4}}
|
|
27
29
|
resizeMode='cover'
|
|
28
30
|
/>
|
|
29
|
-
<View style={{ flex:1, marginLeft:10, marginRight:10
|
|
30
|
-
<Text theme='
|
|
31
|
-
<Text style={{ marginTop:3 }} theme='
|
|
31
|
+
<View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
|
|
32
|
+
<Text theme='h2'>{squares_competition.sq_comp_name}</Text>
|
|
33
|
+
<Text style={{ marginTop:3 }} theme='description'>{squares_competition.sq_comp_description}</Text>
|
|
32
34
|
</View>
|
|
33
|
-
<Text size={20} color={Colors.
|
|
35
|
+
<Text size={20} color={Colors.text.action} weight='bold'>${squares_competition.minimum_square_price}</Text>
|
|
34
36
|
</View>
|
|
35
|
-
<View style={{
|
|
36
|
-
<View
|
|
37
|
+
<View type='body' style={{ padding:10 }}>
|
|
38
|
+
<View type='row'>
|
|
37
39
|
{event ?
|
|
38
|
-
<View style={{ flex:1, flexDirection:'row', marginRight:10, borderRightWidth:1, borderColor:Colors.
|
|
40
|
+
<View transparent style={{ flex:1, flexDirection:'row', marginRight:10, borderRightWidth:1, borderColor:Colors.borders.light }}>
|
|
39
41
|
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
40
42
|
<Image
|
|
41
43
|
source={{ uri: event.away?.image?.url }}
|
|
42
44
|
style={{ height:30, width:30 }}
|
|
43
45
|
resizeMode='cover'
|
|
44
46
|
/>
|
|
45
|
-
<Text style={{ padding:5 }} theme='
|
|
47
|
+
<Text style={{ padding:5 }} theme='h2'>VS</Text>
|
|
46
48
|
<Image
|
|
47
49
|
source={{ uri: event.home?.image?.url }}
|
|
48
50
|
style={{ height:30, width:30 }}
|
|
49
51
|
resizeMode='cover'
|
|
50
52
|
/>
|
|
51
53
|
</View>
|
|
52
|
-
<View style={{ flex:1, marginLeft:10 }}>
|
|
53
|
-
<Text theme='
|
|
54
|
-
<Text style={{ marginTop:3 }} theme='
|
|
54
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
55
|
+
<Text theme='h2'>{event.event_title}</Text>
|
|
56
|
+
<Text style={{ marginTop:3 }} theme='description'>{event.time_detail == 'scheduled' ? moment(event.scheduled_datetime).format('MMM DD hh:mm a') : event.time_detail}</Text>
|
|
55
57
|
</View>
|
|
56
58
|
</View>
|
|
57
59
|
:<></>}
|
|
58
|
-
<View style={{ justifyContent:'center', alignItems:'center' }}>
|
|
59
|
-
<Icons.SquaresIcon size={24} color={Colors.
|
|
60
|
-
<Text style={{ marginTop:3 }} theme='
|
|
60
|
+
<View transparent style={{ justifyContent:'center', alignItems:'center' }}>
|
|
61
|
+
<Icons.SquaresIcon size={24} color={Colors.text.h1} />
|
|
62
|
+
<Text style={{ marginTop:3 }} theme='h2'>AUCTION</Text>
|
|
61
63
|
</View>
|
|
62
64
|
</View>
|
|
63
65
|
</View>
|
|
64
|
-
<View style={{
|
|
66
|
+
<View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
65
67
|
{company ?
|
|
66
68
|
<Image
|
|
67
69
|
source={{ uri: company.company_image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
@@ -75,17 +77,19 @@ const SquaresCompetitionCard = ({ squares_competition, admin, event, company, on
|
|
|
75
77
|
resizeMode='cover'
|
|
76
78
|
/>
|
|
77
79
|
:<></>}
|
|
78
|
-
<View style={{ flex:1, marginLeft:20, marginRight:20 }}>
|
|
79
|
-
<Text theme='
|
|
80
|
-
{
|
|
81
|
-
<Text style={{ marginTop:3 }} color={Colors.
|
|
80
|
+
<View transparent style={{ flex:1, marginLeft:20, marginRight:20 }}>
|
|
81
|
+
<Text theme='h2'>{is_closed ? 'TOTAL PAID OUT': 'CURRENT PAYOUT'}</Text>
|
|
82
|
+
{is_closed ?
|
|
83
|
+
<Text style={{ marginTop:3 }} color={Colors.text.gold} weight='bold' size={12}>COMPLETED</Text>
|
|
84
|
+
:is_live ?
|
|
85
|
+
<Text style={{ marginTop:3 }} color={Colors.text.error} weight='bold' size={12}>AUCTION COMPLETE</Text>
|
|
82
86
|
:
|
|
83
|
-
<Text style={{ marginTop:3 }} theme='
|
|
87
|
+
<Text style={{ marginTop:3 }} theme='light'>Auction Ends {moment(squares_competition.begin_datetime).fromNow()}</Text>
|
|
84
88
|
}
|
|
85
89
|
</View>
|
|
86
|
-
<Text color={Colors.
|
|
90
|
+
<Text color={Colors.text.success} size={20} weight='bold'>${current_payout.toFixed(2)}</Text>
|
|
87
91
|
</View>
|
|
88
|
-
</
|
|
92
|
+
</Button>
|
|
89
93
|
)
|
|
90
94
|
}
|
|
91
95
|
|