be-components 2.8.1 → 3.0.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/ApiOverrides/index.js +3 -3
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/Authenticator/Components/LoginForm.js +4 -1
- package/lib/commonjs/Authenticator/Components/LoginForm.js.map +1 -1
- package/lib/commonjs/Authenticator/Components/StrategyForm.js +6 -0
- package/lib/commonjs/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/commonjs/Authenticator/api/index.js +4 -5
- package/lib/commonjs/Authenticator/api/index.js.map +1 -1
- package/lib/commonjs/Competition/components/AthleteMarketCard.js +1 -3
- package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -1
- package/lib/commonjs/Competition/components/CompetitionPlay.js +3 -3
- package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -1
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +1 -3
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -1
- package/lib/commonjs/Competition/index.js +9 -14
- package/lib/commonjs/Competition/index.js.map +1 -1
- package/lib/commonjs/Components/Button.js +3 -2
- package/lib/commonjs/Components/Button.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +642 -942
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/ImageUploader.js +96 -45
- package/lib/commonjs/Components/ImageUploader.js.map +1 -1
- package/lib/commonjs/Components/Jerseys.js +114 -124
- package/lib/commonjs/Components/Jerseys.js.map +1 -1
- package/lib/commonjs/Components/LinearDiagnal.js +2 -2
- package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
- package/lib/commonjs/Components/Spring.js +19 -7
- package/lib/commonjs/Components/Spring.js.map +1 -1
- package/lib/commonjs/Components/Text.js +6 -6
- package/lib/commonjs/Components/Text.js.map +1 -1
- package/lib/commonjs/Components/TextInput.js +2 -2
- package/lib/commonjs/Components/TextInput.js.map +1 -1
- package/lib/commonjs/Components/ViewportObserver.js +7 -0
- package/lib/commonjs/Components/ViewportObserver.js.map +1 -1
- package/lib/commonjs/EventComponents/TeamProfile/index.js +2 -2
- package/lib/commonjs/EventComponents/TeamProfile/index.js.map +1 -1
- package/lib/commonjs/Font.css +4 -4
- package/lib/commonjs/LocationTracker/LocationStatus.js +7 -4
- package/lib/commonjs/LocationTracker/LocationStatus.js.map +1 -1
- package/lib/commonjs/LocationTracker/api/index.js +225 -96
- package/lib/commonjs/LocationTracker/api/index.js.map +1 -1
- package/lib/commonjs/LocationTracker/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/api/index.js +0 -2
- package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js +0 -2
- package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/EventMarket/index.js +0 -1
- package/lib/commonjs/MarketComponents/components/EventMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +1 -3
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +19 -6
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js +10 -6
- package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PasswordManager.js +8 -7
- package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js +4 -1
- package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/commonjs/SocialComponents/AudioPlayer.js +2 -3
- package/lib/commonjs/SocialComponents/AudioPlayer.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js +60 -51
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js +5 -7
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js.map +1 -1
- package/lib/commonjs/Squares/components/BidForm.js +1 -7
- package/lib/commonjs/Squares/components/BidForm.js.map +1 -1
- package/lib/commonjs/Squares/components/BidToggle.js +0 -1
- package/lib/commonjs/Squares/components/BidToggle.js.map +1 -1
- package/lib/commonjs/Squares/components/SquareCard.js +2 -1
- package/lib/commonjs/Squares/components/SquareCard.js.map +1 -1
- package/lib/commonjs/Squares/components/SquaresBoard.js +11 -7
- package/lib/commonjs/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/commonjs/Squares/index.js +10 -10
- package/lib/commonjs/Squares/index.js.map +1 -1
- package/lib/commonjs/constants/styles.js +9 -9
- package/lib/commonjs/constants/styles.js.map +1 -1
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +3 -3
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/Authenticator/Components/LoginForm.js +4 -1
- package/lib/module/Authenticator/Components/LoginForm.js.map +1 -1
- package/lib/module/Authenticator/Components/StrategyForm.js +6 -0
- package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/module/Authenticator/api/index.js +4 -5
- package/lib/module/Authenticator/api/index.js.map +1 -1
- package/lib/module/Competition/components/AthleteMarketCard.js +1 -3
- package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -1
- package/lib/module/Competition/components/CompetitionPlay.js +1 -1
- package/lib/module/Competition/components/CompetitionPlay.js.map +1 -1
- package/lib/module/Competition/components/EnterCompetitionPrompt.js +1 -3
- package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -1
- package/lib/module/Competition/index.js +10 -15
- package/lib/module/Competition/index.js.map +1 -1
- package/lib/module/Components/Button.js +3 -2
- package/lib/module/Components/Button.js.map +1 -1
- package/lib/module/Components/Icons.js +640 -942
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/ImageUploader.js +96 -45
- package/lib/module/Components/ImageUploader.js.map +1 -1
- package/lib/module/Components/Jerseys.js +112 -124
- package/lib/module/Components/Jerseys.js.map +1 -1
- package/lib/module/Components/LinearDiagnal.js +1 -1
- package/lib/module/Components/LinearDiagnal.js.map +1 -1
- package/lib/module/Components/Spring.js +19 -7
- package/lib/module/Components/Spring.js.map +1 -1
- package/lib/module/Components/Text.js +6 -6
- package/lib/module/Components/Text.js.map +1 -1
- package/lib/module/Components/TextInput.js +2 -2
- package/lib/module/Components/TextInput.js.map +1 -1
- package/lib/module/Components/ViewportObserver.js +7 -0
- package/lib/module/Components/ViewportObserver.js.map +1 -1
- package/lib/module/EventComponents/TeamProfile/index.js +1 -1
- package/lib/module/EventComponents/TeamProfile/index.js.map +1 -1
- package/lib/module/Font.css +4 -4
- package/lib/module/LocationTracker/LocationStatus.js +5 -4
- package/lib/module/LocationTracker/LocationStatus.js.map +1 -1
- package/lib/module/LocationTracker/api/index.js +222 -96
- package/lib/module/LocationTracker/api/index.js.map +1 -1
- package/lib/module/LocationTracker/index.js.map +1 -1
- package/lib/module/MarketComponents/api/index.js +0 -2
- package/lib/module/MarketComponents/api/index.js.map +1 -1
- package/lib/module/MarketComponents/components/AthleteMarket/index.js +0 -2
- package/lib/module/MarketComponents/components/AthleteMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/EventMarket/index.js +0 -1
- package/lib/module/MarketComponents/components/EventMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/MatchMarket/index.js +1 -3
- package/lib/module/MarketComponents/components/MatchMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +18 -5
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TournamentMarket/index.js +11 -7
- package/lib/module/MarketComponents/components/TournamentMarket/index.js.map +1 -1
- package/lib/module/ProfileManager/Components/PasswordManager.js +8 -7
- package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfilePicManager.js +4 -1
- package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/module/SocialComponents/AudioPlayer.js +2 -3
- package/lib/module/SocialComponents/AudioPlayer.js.map +1 -1
- package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js +59 -50
- package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -1
- package/lib/module/SocialComponents/PlayerProfile/index.js +6 -8
- package/lib/module/SocialComponents/PlayerProfile/index.js.map +1 -1
- package/lib/module/Squares/components/BidForm.js +1 -7
- package/lib/module/Squares/components/BidForm.js.map +1 -1
- package/lib/module/Squares/components/BidToggle.js +0 -1
- package/lib/module/Squares/components/BidToggle.js.map +1 -1
- package/lib/module/Squares/components/SquareCard.js +2 -1
- package/lib/module/Squares/components/SquareCard.js.map +1 -1
- package/lib/module/Squares/components/SquaresBoard.js +12 -8
- package/lib/module/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/module/Squares/index.js +11 -11
- package/lib/module/Squares/index.js.map +1 -1
- package/lib/module/constants/styles.js +9 -9
- package/lib/module/constants/styles.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/Components/LoginForm.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +1 -1
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -1
- package/lib/typescript/src/Competition/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +1 -2
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/ImageUploader.d.ts +2 -2
- package/lib/typescript/src/Components/ImageUploader.d.ts.map +1 -1
- package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -1
- package/lib/typescript/src/Components/Spring.d.ts.map +1 -1
- package/lib/typescript/src/Components/Text.d.ts.map +1 -1
- package/lib/typescript/src/Components/TextInput.d.ts +2 -2
- package/lib/typescript/src/Components/TextInput.d.ts.map +1 -1
- package/lib/typescript/src/Components/ViewportObserver.d.ts.map +1 -1
- package/lib/typescript/src/EventComponents/index.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts +2 -1
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/api/index.d.ts +5 -3
- package/lib/typescript/src/LocationTracker/api/index.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/index.d.ts +2 -1
- package/lib/typescript/src/LocationTracker/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts +3 -2
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/index.d.ts +2 -1
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts +1 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/BidForm.d.ts +1 -1
- package/lib/typescript/src/Squares/components/BidForm.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/SquaresBoard.d.ts.map +1 -1
- package/lib/typescript/src/Squares/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/styles.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +23 -7
- package/src/ApiOverrides/index.ts +4 -3
- package/src/Authenticator/Components/LoginForm.tsx +4 -1
- package/src/Authenticator/Components/StrategyForm.tsx +6 -0
- package/src/Authenticator/api/index.ts +6 -8
- package/src/Competition/components/AthleteMarketCard.tsx +1 -1
- package/src/Competition/components/CompetitionPlay.tsx +1 -1
- package/src/Competition/components/EnterCompetitionPrompt.tsx +3 -3
- package/src/Competition/index.tsx +11 -12
- package/src/Components/Button.tsx +20 -20
- package/src/Components/Icons.tsx +778 -897
- package/src/Components/ImageUploader.tsx +59 -12
- package/src/Components/Jerseys.tsx +127 -132
- package/src/Components/LinearDiagnal.tsx +1 -1
- package/src/Components/Spring.tsx +24 -7
- package/src/Components/Text.tsx +6 -9
- package/src/Components/TextInput.tsx +3 -3
- package/src/Components/ViewportObserver.tsx +4 -0
- package/src/EventComponents/TeamProfile/index.tsx +1 -1
- package/src/Font.css +4 -4
- package/src/LocationTracker/LocationStatus.tsx +6 -6
- package/src/LocationTracker/api/index.tsx +172 -59
- package/src/LocationTracker/index.tsx +2 -1
- package/src/MarketComponents/api/index.ts +0 -2
- package/src/MarketComponents/components/AthleteMarket/index.tsx +2 -2
- package/src/MarketComponents/components/EventMarket/index.tsx +1 -1
- package/src/MarketComponents/components/MatchMarket/index.tsx +3 -4
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +26 -14
- package/src/MarketComponents/components/TournamentMarket/index.tsx +12 -11
- package/src/ProfileManager/Components/PasswordManager.tsx +6 -7
- package/src/ProfileManager/Components/ProfilePicManager.tsx +4 -1
- package/src/SocialComponents/AudioPlayer.tsx +4 -4
- package/src/SocialComponents/PlayerProfile/components/PostsList.tsx +14 -7
- package/src/SocialComponents/PlayerProfile/index.tsx +4 -4
- package/src/Squares/components/BidForm.tsx +4 -5
- package/src/Squares/components/BidToggle.tsx +1 -1
- package/src/Squares/components/SquareCard.tsx +2 -2
- package/src/Squares/components/SquaresBoard.tsx +22 -20
- package/src/Squares/index.tsx +10 -7
- package/src/constants/styles.ts +9 -9
- package/src/index.tsx +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, StyleSheet } from "react-native"
|
|
3
|
-
import LinearGradient from "
|
|
3
|
+
import {LinearGradient} from "expo-linear-gradient";
|
|
4
4
|
import Colors from '../constants/colors';
|
|
5
5
|
import Text from './Text';
|
|
6
6
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Modal, Platform } from 'react-native';
|
|
2
3
|
import { useSpring, animated } from '@react-spring/web';
|
|
4
|
+
import Text from './Text';
|
|
3
5
|
|
|
4
6
|
type SpringViewProps = {
|
|
5
7
|
style?: any,
|
|
@@ -33,15 +35,30 @@ const SpringView = ({ style, children, from, to, slide, onResolve }:SpringViewPr
|
|
|
33
35
|
|
|
34
36
|
const props = useSpring(config)
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
if(Platform.OS == 'web'){
|
|
39
|
+
return (
|
|
40
|
+
<animated.div
|
|
41
|
+
onAnimationEnd={() => console.log('animation has ended')}
|
|
42
|
+
style={{ ...props, ...style }}
|
|
43
|
+
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</animated.div>
|
|
47
|
+
)
|
|
48
|
+
} else {
|
|
49
|
+
return (
|
|
50
|
+
<Modal
|
|
51
|
+
style={{ ...style }}
|
|
52
|
+
animationType="slide"
|
|
53
|
+
visible={true}
|
|
41
54
|
>
|
|
55
|
+
<Text>HEY THIS SHOULD BE IN HERE!!!</Text>
|
|
42
56
|
{children}
|
|
43
|
-
</
|
|
44
|
-
|
|
57
|
+
</Modal>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
45
62
|
}
|
|
46
63
|
|
|
47
64
|
export default SpringView
|
package/src/Components/Text.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import '../Font.css';
|
|
|
4
4
|
import Colors from '../constants/colors';
|
|
5
5
|
import { text_styles } from '../constants/styles';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
export interface TextProps {
|
|
9
8
|
weight?:'bold'|'semibold'|'regular'|'light',
|
|
10
9
|
color?:string,
|
|
@@ -20,7 +19,6 @@ const STANDARD_SIZE = 414
|
|
|
20
19
|
|
|
21
20
|
const Text = ({ weight, color, size, children, theme, selectable, textAlign, style }: TextProps) => {
|
|
22
21
|
const dimensions = useWindowDimensions();
|
|
23
|
-
|
|
24
22
|
let rendered_size = size ?? 14
|
|
25
23
|
let diff_from_normal = dimensions.width - STANDARD_SIZE
|
|
26
24
|
if(diff_from_normal < 0){
|
|
@@ -30,16 +28,16 @@ const Text = ({ weight, color, size, children, theme, selectable, textAlign, sty
|
|
|
30
28
|
|
|
31
29
|
const getFontFamily = (weight:string) => {
|
|
32
30
|
switch(weight){
|
|
33
|
-
case 'bold': return '
|
|
34
|
-
case 'semibold': return '
|
|
35
|
-
case 'regular': return '
|
|
36
|
-
case 'light': return '
|
|
37
|
-
default: return '
|
|
31
|
+
case 'bold': return 'BarlowBold'
|
|
32
|
+
case 'semibold': return 'BarlowSemiBold'
|
|
33
|
+
case 'regular': return 'BarlowRegular'
|
|
34
|
+
case 'light': return 'BarlowLight'
|
|
35
|
+
default: return 'BarlowRegular'
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
const getAttributes = () => {
|
|
42
|
-
let default_theme = { color:color??Colors.shades.black, fontSize: size??14, fontFamily:weight?getFontFamily(weight):'
|
|
40
|
+
let default_theme = { color:color??Colors.shades.black, fontSize: size??14, fontFamily:weight?getFontFamily(weight):'BarlowRegular', textAlign: textAlign??'left' }
|
|
43
41
|
switch(theme){
|
|
44
42
|
case 'header': return text_styles.header
|
|
45
43
|
case 'header_2': return text_styles.header_2
|
|
@@ -48,7 +46,6 @@ const Text = ({ weight, color, size, children, theme, selectable, textAlign, sty
|
|
|
48
46
|
case 'error_body': return text_styles.error_body
|
|
49
47
|
case 'body_2': return text_styles.body_2
|
|
50
48
|
case 'error_body_2': return text_styles.error_body_2
|
|
51
|
-
|
|
52
49
|
default: return default_theme
|
|
53
50
|
}
|
|
54
51
|
}
|
|
@@ -5,7 +5,7 @@ import Colors from '../constants/colors';
|
|
|
5
5
|
|
|
6
6
|
type TextInputProps = {
|
|
7
7
|
value?:string,
|
|
8
|
-
|
|
8
|
+
input_key?:string,
|
|
9
9
|
placeholder?:string,
|
|
10
10
|
autoFocus?:boolean,
|
|
11
11
|
multiline?:boolean,
|
|
@@ -23,7 +23,7 @@ type TextInputProps = {
|
|
|
23
23
|
|
|
24
24
|
const STANDARD_SIZE = 414
|
|
25
25
|
|
|
26
|
-
const TextInput = ({ onChangeText,
|
|
26
|
+
const TextInput = ({ onChangeText, input_key, placeholderTextColor, value, placeholder, style, autoFocus, multiline, keyboardType, textContentType, editable, secureTextEntry, onContentSizeChange, onSubmitEditing, onBlur } : TextInputProps) => {
|
|
27
27
|
const dimensions = useWindowDimensions();
|
|
28
28
|
|
|
29
29
|
let rendered_size = style?.fontSize ?? 14
|
|
@@ -35,7 +35,7 @@ const TextInput = ({ onChangeText, key, placeholderTextColor, value, placeholder
|
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<RNTextInput
|
|
38
|
-
key={
|
|
38
|
+
key={input_key}
|
|
39
39
|
onContentSizeChange={onContentSizeChange}
|
|
40
40
|
multiline={multiline ? true : false}
|
|
41
41
|
style={{
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { useState, useMemo, useEffect } from "react";
|
|
2
|
+
import { Platform } from 'react-native';
|
|
2
3
|
|
|
3
4
|
export const useIsInViewport = (ref:any) => {
|
|
4
5
|
const [ isIntersecting, setIsIntersecting ] = useState(false);
|
|
5
6
|
|
|
7
|
+
if(Platform.OS != 'web'){ return true }
|
|
8
|
+
|
|
6
9
|
const observer = useMemo(
|
|
7
10
|
() =>
|
|
8
11
|
new IntersectionObserver(([entry]) => {
|
|
@@ -15,6 +18,7 @@ export const useIsInViewport = (ref:any) => {
|
|
|
15
18
|
|
|
16
19
|
useEffect(() => {
|
|
17
20
|
if(!ref?.current){ return }
|
|
21
|
+
if(Platform.OS != 'web'){ return }
|
|
18
22
|
observer.observe(ref.current);
|
|
19
23
|
return () => {
|
|
20
24
|
observer.disconnect();
|
|
@@ -3,7 +3,7 @@ import { View, Image, ScrollView, FlatList, TouchableOpacity, ActivityIndicator
|
|
|
3
3
|
import type { EventProps, OrderProps, TeamProps, TradeProps } from '../../types';
|
|
4
4
|
import { EventComponentApi } from '../api';
|
|
5
5
|
import { Text } from '../../Components';
|
|
6
|
-
import LinearGradient from '
|
|
6
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
7
7
|
import Colors from '../../constants/colors';
|
|
8
8
|
import { view_styles } from '../../constants/styles';
|
|
9
9
|
import TeamEventList from '../../MarketComponents/components/TeamEventList';
|
package/src/Font.css
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'barlow-bold';
|
|
3
|
-
src: local('
|
|
3
|
+
src: local('BarlowBold'),
|
|
4
4
|
url('./Assets/fonts/Barlow-Bold.ttf')
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@font-face {
|
|
8
8
|
font-family: 'barlow-semibold';
|
|
9
|
-
src: local('
|
|
9
|
+
src: local('BarlowSemiBold'),
|
|
10
10
|
url('./Assets/fonts/Barlow-SemiBold.ttf')
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@font-face {
|
|
14
14
|
font-family: 'barlow-regular';
|
|
15
|
-
src: local('
|
|
15
|
+
src: local('BarlowRegular'),
|
|
16
16
|
url('./Assets/fonts/Barlow-Regular.ttf')
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@font-face {
|
|
20
20
|
font-family: 'barlow-light';
|
|
21
|
-
src: local('
|
|
21
|
+
src: local('BarlowLight'),
|
|
22
22
|
url('./Assets/fonts/Barlow-Light.ttf')
|
|
23
23
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { LocationApi, LocationHelpers } from './api';
|
|
3
3
|
import type { LocationProps, PlayerAddressProps } from '../types';
|
|
4
|
+
import * as Location from 'expo-location';
|
|
4
5
|
|
|
5
6
|
type UsePlayerLocationProps = {
|
|
6
7
|
player_id?:string,
|
|
@@ -24,7 +25,7 @@ export const usePlayerLocation = ({ player_id, distinct_id }:UsePlayerLocationPr
|
|
|
24
25
|
})
|
|
25
26
|
const [ permission, setPermission ] = useState<{
|
|
26
27
|
checked:boolean,
|
|
27
|
-
permission?:
|
|
28
|
+
permission?: Location.PermissionStatus
|
|
28
29
|
}>({
|
|
29
30
|
checked:false
|
|
30
31
|
})
|
|
@@ -55,22 +56,21 @@ export const usePlayerLocation = ({ player_id, distinct_id }:UsePlayerLocationPr
|
|
|
55
56
|
setLocation({ ...location, loading: true })
|
|
56
57
|
try {
|
|
57
58
|
|
|
58
|
-
let cached_loc = await LocationApi.getCachedLocation();
|
|
59
|
+
let cached_loc = undefined//await LocationApi.getCachedLocation();
|
|
59
60
|
if(cached_loc && !options?.no_cache){
|
|
60
61
|
setLocation(cached_loc)
|
|
61
|
-
setPermission({ checked: true, permission:
|
|
62
|
+
setPermission({ checked: true, permission: Location.PermissionStatus.GRANTED });
|
|
62
63
|
} else {
|
|
63
64
|
const coordinates = await LocationApi.getPosition();
|
|
64
65
|
setPermission({
|
|
65
66
|
checked:true,
|
|
66
|
-
permission:
|
|
67
|
+
permission: Location.PermissionStatus.GRANTED
|
|
67
68
|
})
|
|
68
69
|
const locations = await LocationApi.getLocations();
|
|
69
70
|
|
|
70
71
|
//OK! First we are going to try and compare to the players last location
|
|
71
72
|
//If the user is within a mile, then we will use their last one for this
|
|
72
73
|
const { last_location, distance } = await LocationApi.compareLastLocation({ anonymous_id:distinct_id, player_id: player_id ?? '0', coordinates:coordinates, player_location_id: '', create_datetime: '' })
|
|
73
|
-
|
|
74
74
|
if(last_location && distance < 5){
|
|
75
75
|
const gen_addy = LocationHelpers.getAddressFromLastLocation(last_location, locations);
|
|
76
76
|
if(gen_addy){
|
|
@@ -110,7 +110,7 @@ export const usePlayerLocation = ({ player_id, distinct_id }:UsePlayerLocationPr
|
|
|
110
110
|
console.log('ERROR GETTING LOC!')
|
|
111
111
|
setPermission({
|
|
112
112
|
checked:true,
|
|
113
|
-
permission:
|
|
113
|
+
permission: Location.PermissionStatus.DENIED
|
|
114
114
|
})
|
|
115
115
|
setLocation({
|
|
116
116
|
loading:false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from "axios"
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
|
-
import Geolocation from '@react-native-community/geolocation';
|
|
4
|
-
|
|
3
|
+
//import Geolocation from '@react-native-community/geolocation';
|
|
4
|
+
import * as Location from 'expo-location';
|
|
5
5
|
import { APIOverrides } from "../../ApiOverrides";
|
|
6
6
|
import type { LocationProps, PlayerAddressProps, PlayerLocationProps } from "../../types";
|
|
7
7
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
@@ -26,7 +26,10 @@ const LocationApi = {
|
|
|
26
26
|
},
|
|
27
27
|
compareLastLocation: async(player_location:PlayerLocationProps):Promise<{ last_location?:PlayerLocationProps, distance:number }> => {
|
|
28
28
|
try {
|
|
29
|
+
if(Platform.OS != 'web'){ return { distance: 1000 } }
|
|
30
|
+
console.log('comparing!!!')
|
|
29
31
|
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/locations/player/compare`, { player_location })
|
|
32
|
+
console.log(resp.data)
|
|
30
33
|
return { distance: resp.data.distance, last_location: resp.data.last_location }
|
|
31
34
|
} catch (e) {
|
|
32
35
|
console.log(e)
|
|
@@ -42,13 +45,9 @@ const LocationApi = {
|
|
|
42
45
|
return undefined
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
|
-
getPermission: async():Promise<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return permissions.state
|
|
49
|
-
} else {
|
|
50
|
-
return 'denied'
|
|
51
|
-
}
|
|
48
|
+
getPermission: async():Promise<Location.PermissionStatus> => {
|
|
49
|
+
let { status } = await Location.requestForegroundPermissionsAsync();
|
|
50
|
+
return status
|
|
52
51
|
},
|
|
53
52
|
cache_location: async(loc:any):Promise<void> => {
|
|
54
53
|
await AsyncStorage.setItem('cache_location', JSON.stringify({ ...loc, cached_at:moment() }))
|
|
@@ -64,51 +63,184 @@ const LocationApi = {
|
|
|
64
63
|
return undefined
|
|
65
64
|
},
|
|
66
65
|
getPosition: async():Promise<any> => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})
|
|
80
|
-
})
|
|
66
|
+
const location = await Location.getCurrentPositionAsync();
|
|
67
|
+
|
|
68
|
+
if(!location){ return undefined }
|
|
69
|
+
const { coords } = location;
|
|
70
|
+
return {
|
|
71
|
+
latitude: coords.latitude,
|
|
72
|
+
longitude: coords.longitude,
|
|
73
|
+
altitude: coords.altitude,
|
|
74
|
+
altitudeAccuracty: coords.altitudeAccuracy,
|
|
75
|
+
speed: coords.speed,
|
|
76
|
+
accuracy: coords.accuracy
|
|
77
|
+
}
|
|
81
78
|
},
|
|
82
79
|
reverseCoordLookup : async(latitude:number, longitude:number) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
let addresses:Location.LocationGeocodedAddress[] = []
|
|
81
|
+
if(Platform.OS == 'web'){
|
|
82
|
+
const resp = await axios.get(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${LOCATION_API}`, {
|
|
83
|
+
headers: {
|
|
84
|
+
'Authorization': undefined,
|
|
85
|
+
'x-api-key':undefined,
|
|
86
|
+
'sessionid':undefined,
|
|
87
|
+
'distinctid':undefined
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
addresses = LocationHelpers.getAddressesFromWebReverseGeocode(resp.data.results);
|
|
91
|
+
return addresses
|
|
92
|
+
} else {
|
|
93
|
+
addresses = await Location.reverseGeocodeAsync({ latitude, longitude });
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
return addresses
|
|
92
97
|
}
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
|
|
96
101
|
const LocationHelpers = {
|
|
97
|
-
getAddressFromGeoCodeResults: (addresses:
|
|
102
|
+
getAddressFromGeoCodeResults: (addresses:Location.LocationGeocodedAddress[], locations:LocationProps[]):{ player_address?: PlayerAddressProps, region: string, location?:LocationProps } => {
|
|
103
|
+
let address = addresses[0]
|
|
104
|
+
if(!address){ return { region: 'UNKNOWN' } }
|
|
105
|
+
let location = locations.find(l => l.value.toLowerCase() == address.region?.toLowerCase());
|
|
106
|
+
if(!location){ return { region: address.region??'UNKNOWN' } }
|
|
107
|
+
let region = location.label
|
|
108
|
+
|
|
98
109
|
let player_address:PlayerAddressProps = {
|
|
99
110
|
player_address_id: '',
|
|
100
111
|
player_id: '',
|
|
101
|
-
street:
|
|
102
|
-
city:
|
|
103
|
-
state:
|
|
104
|
-
zip
|
|
112
|
+
street: `${address.streetNumber} ${address.street}`,
|
|
113
|
+
city: `${address.city}`,
|
|
114
|
+
state: `${address.region}`,
|
|
115
|
+
zip:`${address.postalCode}`,
|
|
105
116
|
create_datetime: '', last_update_datetime: '',
|
|
106
|
-
country:
|
|
117
|
+
country: `${address.country}`,
|
|
107
118
|
type: 'billing',
|
|
108
119
|
status: 'active'
|
|
109
120
|
}
|
|
121
|
+
return { player_address, region, location }
|
|
122
|
+
},
|
|
123
|
+
getAddressFromLastLocation: (player_location:PlayerLocationProps, locations:LocationProps[]):{ player_address: PlayerAddressProps, region: string, location?:LocationProps } | undefined => {
|
|
124
|
+
if(!player_location.player_address || !player_location.region){ return undefined }
|
|
125
|
+
let location = locations.find(l => l.label.toLowerCase() == player_location.region?.toLowerCase())
|
|
126
|
+
if(!location){ return undefined }
|
|
127
|
+
return { player_address: player_location.player_address, region: player_location.region, location }
|
|
128
|
+
},
|
|
129
|
+
genPlayerLocationFromAddress: (coordinates: any, region:string, player_address?:PlayerAddressProps, player_id?:string, distinct_id?:string):PlayerLocationProps => {
|
|
130
|
+
return {
|
|
131
|
+
player_location_id: '',
|
|
132
|
+
player_id:player_id ?? '0',
|
|
133
|
+
anonymous_id: distinct_id,
|
|
134
|
+
player_address,
|
|
135
|
+
region,
|
|
136
|
+
coordinates,
|
|
137
|
+
create_datetime:''
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
getAddressesFromWebReverseGeocode: (addresses:any[]):Location.LocationGeocodedAddress[] => {
|
|
141
|
+
let geo_addresses:Location.LocationGeocodedAddress[] = []
|
|
142
|
+
let administrative = addresses.find(r => r.types.includes('administrative_area_level_1'))?.address_components;
|
|
143
|
+
let street_address_components = addresses.find(r => r.types.includes('street_address'))?.address_components;
|
|
144
|
+
let premise_address_component = addresses.find(r => r.types.includes('premise'))?.address_components;
|
|
145
|
+
|
|
146
|
+
let route_address_component = addresses.find(r => r.types.includes('route'))?.address_components;
|
|
147
|
+
let found = false;
|
|
148
|
+
if(street_address_components){
|
|
149
|
+
let street_number = street_address_components.find((c:any) => c.types.includes('street_number'))?.long_name
|
|
150
|
+
let street = street_address_components.find((c:any) => c.types.includes('route'))?.long_name
|
|
151
|
+
let city = street_address_components.find((c:any) => c.types.includes('locality'))?.long_name
|
|
152
|
+
let state = street_address_components.find((c:any) => c.types.includes('administrative_area_level_1'))?.short_name
|
|
153
|
+
let zip = street_address_components.find((c:any) => c.types.includes('postal_code'))?.short_name
|
|
154
|
+
let country = street_address_components.find((c:any) => c.types.includes('country'))?.short_name
|
|
155
|
+
geo_addresses.push({
|
|
156
|
+
streetNumber: street_number,
|
|
157
|
+
street,
|
|
158
|
+
city,
|
|
159
|
+
region: state,
|
|
160
|
+
postalCode: zip,
|
|
161
|
+
country,
|
|
162
|
+
name: 'street',
|
|
163
|
+
district: '',
|
|
164
|
+
subregion: '',
|
|
165
|
+
isoCountryCode: country,
|
|
166
|
+
timezone: '',
|
|
167
|
+
formattedAddress: `${street_number} ${street} ${city} ${state} ${zip}`
|
|
168
|
+
})
|
|
169
|
+
if(state){ found = true }
|
|
170
|
+
}
|
|
171
|
+
if(found) { return geo_addresses }
|
|
172
|
+
if(premise_address_component){
|
|
173
|
+
let street_number = premise_address_component.find((c:any) => c.types.includes('street_number'))?.long_name
|
|
174
|
+
let street = premise_address_component.find((c:any) => c.types.includes('route'))?.long_name
|
|
175
|
+
let city = premise_address_component.find((c:any) => c.types.includes('locality'))?.long_name
|
|
176
|
+
let state = premise_address_component.find((c:any) => c.types.includes('administrative_area_level_1'))?.short_name
|
|
177
|
+
let zip = premise_address_component.find((c:any) => c.types.includes('postal_code'))?.short_name
|
|
178
|
+
let country = premise_address_component.find((c:any) => c.types.includes('country'))?.short_name
|
|
179
|
+
geo_addresses.push({
|
|
180
|
+
streetNumber: street_number,
|
|
181
|
+
street,
|
|
182
|
+
city,
|
|
183
|
+
region: state,
|
|
184
|
+
postalCode: zip,
|
|
185
|
+
country,
|
|
186
|
+
name: 'premis',
|
|
187
|
+
district: '',
|
|
188
|
+
subregion: '',
|
|
189
|
+
isoCountryCode: country,
|
|
190
|
+
timezone: '',
|
|
191
|
+
formattedAddress: `${street_number} ${street} ${city} ${state} ${zip}`
|
|
192
|
+
})
|
|
193
|
+
if(state){ found = true }
|
|
194
|
+
}
|
|
195
|
+
if(route_address_component){
|
|
196
|
+
let street_number = route_address_component.find((c:any) => c.types.includes('street_number'))?.long_name
|
|
197
|
+
let street = route_address_component.find((c:any) => c.types.includes('route'))?.long_name
|
|
198
|
+
let city = route_address_component.find((c:any) => c.types.includes('locality'))?.long_name
|
|
199
|
+
let state = route_address_component.find((c:any) => c.types.includes('administrative_area_level_1'))?.short_name
|
|
200
|
+
let zip = route_address_component.find((c:any) => c.types.includes('postal_code'))?.short_name
|
|
201
|
+
let country = route_address_component.find((c:any) => c.types.includes('country'))?.short_name
|
|
202
|
+
geo_addresses.push({
|
|
203
|
+
streetNumber: street_number,
|
|
204
|
+
street,
|
|
205
|
+
city,
|
|
206
|
+
region: state,
|
|
207
|
+
postalCode: zip,
|
|
208
|
+
country,
|
|
209
|
+
name: 'route',
|
|
210
|
+
district: '',
|
|
211
|
+
subregion: '',
|
|
212
|
+
isoCountryCode: country,
|
|
213
|
+
timezone: '',
|
|
214
|
+
formattedAddress: `${street_number} ${street} ${city} ${state} ${zip}`
|
|
215
|
+
})
|
|
216
|
+
if(state){ found = true }
|
|
217
|
+
}
|
|
218
|
+
if(administrative){
|
|
219
|
+
let state = route_address_component.find((c:any) => c.types.includes('administrative_area_level_1'))?.short_name
|
|
220
|
+
let country = route_address_component.find((c:any) => c.types.includes('country'))?.short_name
|
|
221
|
+
geo_addresses.push({
|
|
222
|
+
streetNumber: '',
|
|
223
|
+
street: '',
|
|
224
|
+
city: '',
|
|
225
|
+
region: state,
|
|
226
|
+
postalCode: '',
|
|
227
|
+
country,
|
|
228
|
+
name: 'administrative',
|
|
229
|
+
district: '',
|
|
230
|
+
subregion: '',
|
|
231
|
+
isoCountryCode: country,
|
|
232
|
+
timezone: '',
|
|
233
|
+
formattedAddress: `${state} ${country}`
|
|
234
|
+
})
|
|
235
|
+
}
|
|
236
|
+
return geo_addresses
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
}
|
|
110
240
|
|
|
111
|
-
|
|
241
|
+
|
|
242
|
+
/*
|
|
243
|
+
//First try to get the administrative area
|
|
112
244
|
let region = '';
|
|
113
245
|
let location:LocationProps | undefined
|
|
114
246
|
let administrative = addresses.find(r => r.types.includes('administrative_area_level_1'))?.address_components;
|
|
@@ -157,23 +289,4 @@ const LocationHelpers = {
|
|
|
157
289
|
region = state_component.long_name
|
|
158
290
|
location = locations.find(l => l.label.toLowerCase() == region?.toLowerCase())
|
|
159
291
|
}
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
getAddressFromLastLocation: (player_location:PlayerLocationProps, locations:LocationProps[]):{ player_address: PlayerAddressProps, region: string, location?:LocationProps } | undefined => {
|
|
163
|
-
if(!player_location.player_address || !player_location.region){ return undefined }
|
|
164
|
-
let location = locations.find(l => l.label.toLowerCase() == player_location.region?.toLowerCase())
|
|
165
|
-
if(!location){ return undefined }
|
|
166
|
-
return { player_address: player_location.player_address, region: player_location.region, location }
|
|
167
|
-
},
|
|
168
|
-
genPlayerLocationFromAddress: (coordinates: any, region:string, player_address?:PlayerAddressProps, player_id?:string, distinct_id?:string):PlayerLocationProps => {
|
|
169
|
-
return {
|
|
170
|
-
player_location_id: '',
|
|
171
|
-
player_id:player_id ?? '0',
|
|
172
|
-
anonymous_id: distinct_id,
|
|
173
|
-
player_address,
|
|
174
|
-
region,
|
|
175
|
-
coordinates,
|
|
176
|
-
create_datetime:''
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
292
|
+
*/
|
|
@@ -4,12 +4,13 @@ import { Button, Text } from '../Components';
|
|
|
4
4
|
import Colors from '../constants/colors';
|
|
5
5
|
import { isSafari, isChrome, isIOS } from 'react-device-detect';
|
|
6
6
|
import type { LocationProps, PlayerAddressProps } from '../types';
|
|
7
|
+
import * as Location from 'expo-location';
|
|
7
8
|
|
|
8
9
|
type LocationTrackerProps = {
|
|
9
10
|
onClose: () => void,
|
|
10
11
|
permission: {
|
|
11
12
|
checked:boolean,
|
|
12
|
-
permission?:
|
|
13
|
+
permission?: Location.PermissionStatus | 'prompt'
|
|
13
14
|
},
|
|
14
15
|
location: {
|
|
15
16
|
loading: boolean,
|
|
@@ -65,9 +65,7 @@ const MarketComponentApi = {
|
|
|
65
65
|
},
|
|
66
66
|
getPodcastsByKeywords: async(keywords:string):Promise<PodcastProps[]> => {
|
|
67
67
|
try {
|
|
68
|
-
console.log(keywords)
|
|
69
68
|
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/podcasts/search/keywords?keywords=${keywords}`);
|
|
70
|
-
console.log(resp.data)
|
|
71
69
|
return resp.data.podcasts
|
|
72
70
|
} catch (e) {
|
|
73
71
|
return []
|
|
@@ -64,7 +64,7 @@ const AthleteMarket = ({ event, show_event, league, hide_liquidity, hide_stat_ba
|
|
|
64
64
|
},[athlete.athlete_id, is_locked, market.market_id, JSON.stringify(event_order_stats), JSON.stringify(best_available_orders)])
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
|
-
<View style={{ ...view_styles.section,
|
|
67
|
+
<View style={{ ...view_styles.section, borderWidth:1, borderColor:Colors.shades.shade600, width }}>
|
|
68
68
|
{!hide_stat_banner ?
|
|
69
69
|
<LinearDiagnal
|
|
70
70
|
label={market.stat_label ?? market.type}
|
|
@@ -79,7 +79,7 @@ const AthleteMarket = ({ event, show_event, league, hide_liquidity, hide_stat_ba
|
|
|
79
79
|
<Text size={12} color={Colors.brand.midnight} textAlign='center' weight='semibold'>{event.event_title}</Text>
|
|
80
80
|
</View>
|
|
81
81
|
:<></>}
|
|
82
|
-
<View style={{ ...view_styles.section_body,
|
|
82
|
+
<View style={{ ...view_styles.section_body, padding:0, justifyContent:'center', alignItems:'center' }}>
|
|
83
83
|
<AthleteImage
|
|
84
84
|
athlete={athlete}
|
|
85
85
|
league={league}
|
|
@@ -60,7 +60,7 @@ const EventMarket = ({ width, event, hide_liquidity, market, latest_trades, best
|
|
|
60
60
|
},[JSON.stringify(best_available_orders)])
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
|
-
<View style={{ ...view_styles.section,
|
|
63
|
+
<View style={{ ...view_styles.section, borderWidth:1, borderColor:Colors.shades.shade600, width, maxWidth:175 }}>
|
|
64
64
|
{!hide_market_banner ?
|
|
65
65
|
<LinearDiagnal
|
|
66
66
|
label={market.stat_label ?? market.type}
|
|
@@ -39,7 +39,6 @@ const MatchMarket = ({ league, match, show_event, hide_liquidity, hide_stat_bann
|
|
|
39
39
|
const match_time_detail = MarketComponentHelpers.getMatchTimeDetail(match);
|
|
40
40
|
let image_size = 32
|
|
41
41
|
if(width){ image_size = width * 0.18 }
|
|
42
|
-
console.log(width)
|
|
43
42
|
|
|
44
43
|
const renderSides = useCallback((data:{ item:MarketSideOptionProps, index:number, market:MarketProps }) => {
|
|
45
44
|
const ba_order = best_available_orders.find(o => o.market_id == market.market_id && o.side == data.item.side && o.show);
|
|
@@ -56,7 +55,7 @@ const MatchMarket = ({ league, match, show_event, hide_liquidity, hide_stat_bann
|
|
|
56
55
|
let side_label = data.item.side == 'away' ? away_athlete?.last_name : home_athlete?.last_name
|
|
57
56
|
|
|
58
57
|
return (
|
|
59
|
-
<View style={{ margin:2, height:50, width:75 }}>
|
|
58
|
+
<View key={`${match.match_id}_${data.item.side}`} style={{ margin:2, height:50, width:75 }}>
|
|
60
59
|
<MarketButton
|
|
61
60
|
side_option={data.item}
|
|
62
61
|
market={data.market}
|
|
@@ -79,7 +78,7 @@ const MatchMarket = ({ league, match, show_event, hide_liquidity, hide_stat_bann
|
|
|
79
78
|
if(match.participant_type == 'athlete' && (!home_athlete || !away_athlete)){ return <></> }
|
|
80
79
|
if(match.participant_type == 'team' && (!home_team || !away_team)){ return <></> }
|
|
81
80
|
return (
|
|
82
|
-
<View style={{ ...view_styles.section,
|
|
81
|
+
<View style={{ ...view_styles.section, borderWidth:1, borderColor:Colors.shades.shade600, width }}>
|
|
83
82
|
{!hide_stat_banner ?
|
|
84
83
|
<LinearDiagnal
|
|
85
84
|
label={market.stat_label ?? market.type}
|
|
@@ -94,7 +93,7 @@ const MatchMarket = ({ league, match, show_event, hide_liquidity, hide_stat_bann
|
|
|
94
93
|
<Text size={12} color={Colors.brand.midnight} textAlign='center' weight='semibold'>{match.match_title}</Text>
|
|
95
94
|
</View>
|
|
96
95
|
:<></>}
|
|
97
|
-
<View style={{ ...view_styles.section_body,
|
|
96
|
+
<View style={{ ...view_styles.section_body, padding:2, justifyContent:'center', alignItems:'center' }}>
|
|
98
97
|
{match.participant_type == 'athlete' && away_athlete && home_athlete ?
|
|
99
98
|
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
100
99
|
<View style={{ borderRadius:100, borderWidth:match.winner == away_athlete?.athlete_id ? 2 : 0, borderColor:Colors.incentive.gold }}>
|