be-components 3.5.1 → 3.5.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.
Files changed (79) hide show
  1. package/lib/commonjs/Competition/index.js +7 -1
  2. package/lib/commonjs/Competition/index.js.map +1 -1
  3. package/lib/commonjs/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -1
  4. package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js +11 -9
  5. package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js.map +1 -1
  6. package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js +18 -18
  7. package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -1
  8. package/lib/commonjs/SocialComponents/PostCard/index.js +35 -35
  9. package/lib/commonjs/SocialComponents/PostCard/index.js.map +1 -1
  10. package/lib/commonjs/SocialComponents/SocialOrderCard.js +64 -48
  11. package/lib/commonjs/SocialComponents/SocialOrderCard.js.map +1 -1
  12. package/lib/commonjs/SocialComponents/SocialOrdersList.js +3 -2
  13. package/lib/commonjs/SocialComponents/SocialOrdersList.js.map +1 -1
  14. package/lib/commonjs/SocialComponents/index.js +7 -0
  15. package/lib/commonjs/SocialComponents/index.js.map +1 -1
  16. package/lib/commonjs/index.js +7 -0
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/module/Competition/index.js +8 -2
  19. package/lib/module/Competition/index.js.map +1 -1
  20. package/lib/module/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -1
  21. package/lib/module/SocialComponents/PostCard/components/PostHeader.js +8 -6
  22. package/lib/module/SocialComponents/PostCard/components/PostHeader.js.map +1 -1
  23. package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js +14 -13
  24. package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -1
  25. package/lib/module/SocialComponents/PostCard/index.js +30 -30
  26. package/lib/module/SocialComponents/PostCard/index.js.map +1 -1
  27. package/lib/module/SocialComponents/SocialOrderCard.js +46 -30
  28. package/lib/module/SocialComponents/SocialOrderCard.js.map +1 -1
  29. package/lib/module/SocialComponents/SocialOrdersList.js +2 -1
  30. package/lib/module/SocialComponents/SocialOrdersList.js.map +1 -1
  31. package/lib/module/SocialComponents/index.js +2 -1
  32. package/lib/module/SocialComponents/index.js.map +1 -1
  33. package/lib/module/index.js +2 -1
  34. package/lib/module/index.js.map +1 -1
  35. package/lib/typescript/lib/commonjs/Competition/index.d.ts.map +1 -1
  36. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -1
  37. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -1
  38. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/index.d.ts.map +1 -1
  39. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  40. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  41. package/lib/typescript/lib/commonjs/SocialComponents/index.d.ts +1 -0
  42. package/lib/typescript/lib/commonjs/index.d.ts +9 -0
  43. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  44. package/lib/typescript/lib/module/Competition/index.d.ts.map +1 -1
  45. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostHeader.d.ts +1 -2
  46. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -1
  47. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostReactionBar.d.ts +1 -2
  48. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -1
  49. package/lib/typescript/lib/module/SocialComponents/PostCard/index.d.ts.map +1 -1
  50. package/lib/typescript/lib/module/SocialComponents/SocialOrderCard.d.ts +1 -2
  51. package/lib/typescript/lib/module/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  52. package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts +1 -2
  53. package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  54. package/lib/typescript/lib/module/SocialComponents/index.d.ts +2 -1
  55. package/lib/typescript/lib/module/SocialComponents/index.d.ts.map +1 -1
  56. package/lib/typescript/lib/module/index.d.ts +2 -1
  57. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  58. package/lib/typescript/src/Competition/index.d.ts.map +1 -1
  59. package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextViewer.d.ts.map +1 -1
  60. package/lib/typescript/src/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -1
  61. package/lib/typescript/src/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -1
  62. package/lib/typescript/src/SocialComponents/PostCard/index.d.ts +4 -3
  63. package/lib/typescript/src/SocialComponents/PostCard/index.d.ts.map +1 -1
  64. package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  65. package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  66. package/lib/typescript/src/SocialComponents/index.d.ts +2 -1
  67. package/lib/typescript/src/SocialComponents/index.d.ts.map +1 -1
  68. package/lib/typescript/src/index.d.ts +2 -1
  69. package/lib/typescript/src/index.d.ts.map +1 -1
  70. package/package.json +1 -1
  71. package/src/Competition/index.tsx +19 -13
  72. package/src/SocialComponents/PostCard/components/DraftTextViewer.tsx +5 -4
  73. package/src/SocialComponents/PostCard/components/PostHeader.tsx +6 -7
  74. package/src/SocialComponents/PostCard/components/PostReactionBar.tsx +13 -14
  75. package/src/SocialComponents/PostCard/index.tsx +33 -26
  76. package/src/SocialComponents/SocialOrderCard.tsx +29 -28
  77. package/src/SocialComponents/SocialOrdersList.tsx +2 -1
  78. package/src/SocialComponents/index.tsx +3 -1
  79. package/src/index.tsx +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kB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AM,kCAAkC,CAAC;AAEpE,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACX,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { CompetitionApi, CompetitionHelpers, CompetitionMatchApi, CompetitionPlayerApi, PlayerPicksApi } from './api';
3
- import { Image, ActivityIndicator, Modal, FlatList } from 'react-native';
3
+ import { Image, ActivityIndicator, Modal, FlatList, KeyboardAvoidingView, Platform } from 'react-native';
4
4
  import { view_styles } from '../constants/styles';
5
5
  import { ConfirmationModal, Icons } from '../Components';
6
6
  import Colors from '../constants/colors';
@@ -518,18 +518,24 @@ const CompetitionModule = ({ competition_id, player_id, confirm_padding, onManag
518
518
  onRequestClose={() => setShowEnterPrompt(false)}
519
519
  animationType='slide'
520
520
  >
521
- <View type='blur' style={{ flex:1, justifyContent:'flex-end' }}>
522
- <WagerPickForm
523
- event_start={draft_player_pick.event_start ?? ''}
524
- event_title={draft_player_pick.event_title ?? ''}
525
- width={module_size.width}
526
- balance={authenticated_competition_player?.wager_based_balance ?? 0}
527
- loading={pick_loading}
528
- player_pick={draft_player_pick.draft_pick}
529
- onCancel={() => setDraftPlayerPick({})}
530
- onSubmit={(pp) => handleWagerSubmit(pp)}
531
- />
532
- </View>
521
+ <KeyboardAvoidingView
522
+ style={{ flex:1 }}
523
+ keyboardVerticalOffset={-150}
524
+ behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
525
+ >
526
+ <View type='blur' style={{ flex:1, justifyContent:'flex-end' }}>
527
+ <WagerPickForm
528
+ event_start={draft_player_pick.event_start ?? ''}
529
+ event_title={draft_player_pick.event_title ?? ''}
530
+ width={module_size.width}
531
+ balance={authenticated_competition_player?.wager_based_balance ?? 0}
532
+ loading={pick_loading}
533
+ player_pick={draft_player_pick.draft_pick}
534
+ onCancel={() => setDraftPlayerPick({})}
535
+ onSubmit={(pp) => handleWagerSubmit(pp)}
536
+ />
537
+ </View>
538
+ </KeyboardAvoidingView>
533
539
  </Modal>
534
540
  :<></>}
535
541
  <Modal
@@ -14,6 +14,7 @@ type DraftTextViewerProps = {
14
14
  }
15
15
 
16
16
  function DraftTextViewer({ post_id, formatted_body, text_fallback }:DraftTextViewerProps) {
17
+
17
18
  const [ failed, setFailed ] = useState(false)
18
19
  const [editorState, setEditorState] = useState(
19
20
  () => EditorState.createEmpty(),
@@ -48,10 +49,10 @@ function DraftTextViewer({ post_id, formatted_body, text_fallback }:DraftTextVie
48
49
  if(failed){ return (<></>) }
49
50
  return (
50
51
  <View>
51
- <Editor
52
- readOnly
53
- editorState={editorState}
54
- onChange={setEditorState} />
52
+ <Editor
53
+ readOnly
54
+ editorState={editorState}
55
+ onChange={setEditorState} />
55
56
  </View>
56
57
 
57
58
  )
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { Image, View } from 'react-native';
3
- import { view_styles } from '../../../constants/styles';
2
+ import { Image } from 'react-native';
4
3
  import type { PostProps, PublicPlayerProps } from '../../../types';
5
- import { Text } from '../../../Components';
6
4
  import moment from 'moment-mini';
5
+ import { Text, View } from '../../../Components/Themed';
7
6
 
8
7
  type PostHeaderProps = {
9
8
  player: PublicPlayerProps,
@@ -12,15 +11,15 @@ type PostHeaderProps = {
12
11
 
13
12
  const PostHeader = ({ player, post }:PostHeaderProps) => {
14
13
  return (
15
- <View style={{ ...view_styles.section_header, paddingLeft:10, padding:10 }}>
14
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', paddingLeft:10, padding:10 }}>
16
15
  <Image
17
16
  source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
18
17
  style={{ height:32, width:32, borderRadius:100 }}
19
18
  resizeMode='cover'
20
19
  />
21
- <View style={{ flex:1, marginLeft:10 }}>
22
- <Text theme='header_2'>{player.first_name} {player.last_name}</Text>
23
- <Text style={{ marginTop:3 }} theme='body_2'>@{player.username} • {moment(post.create_datetime).fromNow()}</Text>
20
+ <View transparent style={{ flex:1, marginLeft:10 }}>
21
+ <Text theme='h2'>{player.first_name} {player.last_name}</Text>
22
+ <Text style={{ marginTop:3 }} theme='description'>@{player.username} • {moment(post.create_datetime).fromNow()}</Text>
24
23
  </View>
25
24
  </View>
26
25
  )
@@ -1,9 +1,9 @@
1
1
  import React, { useState } from 'react';
2
- import { FlatList, View, TouchableOpacity, ActivityIndicator } from "react-native"
2
+ import { FlatList, ActivityIndicator } from "react-native"
3
3
  import type { PostReactionProps, PostReactionStatsProps } from '../../../types';
4
- import { Button, Text } from '../../../Components';
5
- import Colors from '../../../constants/colors';
6
4
  import { view_styles } from '../../../constants/styles';
5
+ import { Button, Text, View } from '../../../Components/Themed';
6
+ import { useColors } from '../../../constants/useColors';
7
7
 
8
8
  type PostReactionBarProps = {
9
9
  post_id:string,
@@ -26,6 +26,7 @@ const available_reactions = [
26
26
  ]
27
27
 
28
28
  const PostReactionBar = ({ post_id, loading, post_reaction_stats, my_post_reactions, onReactionSelect }:PostReactionBarProps) => {
29
+ const Colors = useColors();
29
30
  const [ more_selected, setMoreSelected ] = useState(false);
30
31
 
31
32
  const handleReaction = async(reaction:string) => {
@@ -50,17 +51,17 @@ const PostReactionBar = ({ post_id, loading, post_reaction_stats, my_post_reacti
50
51
  const my_reaction = my_post_reactions.find(pr => pr.reaction === data.item.reaction)
51
52
  const selected = my_reaction?.status === 'visible' ? true : false
52
53
  return (
53
- <TouchableOpacity style={
54
+ <Button style={
54
55
  reacted ?
55
- { ...view_styles.float, marginBottom:5, marginLeft:data.index===0?0:-5, paddingRight:10, paddingLeft:5, flexDirection:'row', alignItems:'center', padding:2, borderRadius:100, backgroundColor:selected?Colors.highlights.highlight200:Colors.shades.white }
56
+ { ...view_styles.float, marginBottom:5, marginLeft:data.index===0?0:-5, paddingRight:10, paddingLeft:5, flexDirection:'row', alignItems:'center', padding:2, borderRadius:100, backgroundColor:selected?Colors.text.success:Colors.text.white }
56
57
  :
57
- {}} onPress={() => handleReaction(data.item.reaction)}>
58
+ { padding:3 }} onPress={() => handleReaction(data.item.reaction)}>
58
59
 
59
60
  <Text style={{fontSize:12, padding:6}}>{data.item.label}</Text>
60
61
  {reaction_stat && !more_selected && post_reaction_stats.length < 5 ?
61
- <Text size={12} color={selected ? Colors.shades.white : Colors.brand.midnight} weight='regular' style={{ padding:3 }}>{reaction_stat.reaction_count}</Text>
62
+ <Text size={12} color={selected ? Colors.text.h1 : Colors.text.h1} weight='regular' style={{ padding:3 }}>{reaction_stat.reaction_count}</Text>
62
63
  :<></>}
63
- </TouchableOpacity>
64
+ </Button>
64
65
  )
65
66
  }
66
67
 
@@ -74,16 +75,14 @@ const PostReactionBar = ({ post_id, loading, post_reaction_stats, my_post_reacti
74
75
  {post_reaction_stats.length > 0 && !more_selected ?
75
76
  <Button
76
77
  title='MORE'
77
- title_color={Colors.brand.electric}
78
- title_size={10}
79
- style={{ marginLeft:4 }}
80
- padding={0}
78
+ type='text'
79
+ style={{ padding:5 }}
81
80
  onPress={() => setMoreSelected(true)}
82
81
  />
83
82
  :<></>}
84
83
  {loading ?
85
- <View style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', backgroundColor:Colors.shades.black_faded, borderRadius:22 }}>
86
- <ActivityIndicator size='small' color={Colors.brand.midnight} />
84
+ <View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', borderRadius:22 }}>
85
+ <ActivityIndicator size='small' color={Colors.text.h1} />
87
86
  </View>
88
87
  :<></>}
89
88
  </View>
@@ -1,30 +1,31 @@
1
1
  import React, { useEffect, useRef, useState } from 'react';
2
- import { View, TouchableOpacity } from 'react-native';
3
- import DraftTextViewer from './components/DraftTextViewer';
4
- import type { OrderProps, PostCommentStatProps, PostProps, PostReactionProps, PostReactionStatsProps, PublicPlayerProps } from '../../types';
2
+ import type { ArticleProps, OrderProps, PostCommentStatProps, PostProps, PostReactionProps, PostReactionStatsProps, PublicPlayerProps } from '../../types';
5
3
  import PostHeader from './components/PostHeader';
6
- import { view_styles } from '../../constants/styles';
7
4
  import { useIsInViewport } from '../../Components/ViewportObserver';
8
5
  import { SocialProfileApi } from '../PlayerProfile/api';
9
6
 
10
7
  import PostReactionBar from './components/PostReactionBar';
11
- import Colors from '../../constants/colors';
12
- import { Icons, Text } from '../../Components';
8
+ import { Icons } from '../../Components';
13
9
  import SocialOrdersList from '../SocialOrdersList';
14
10
  import ImageList from './components/ImageList';
15
11
  import { SocialComponentApi } from '../api';
12
+ import { Button, Text, View } from '../../Components/Themed';
13
+ import { useColors } from '../../constants/useColors';
14
+
16
15
 
17
16
  type PostCardProps = {
18
17
  post: PostProps,
19
- player:PublicPlayerProps,
18
+ player?:PublicPlayerProps,
19
+ articles:ArticleProps[],
20
20
  orders:OrderProps[],
21
21
  player_id?:string,
22
22
  onRequestAuthenticate:() => void,
23
23
  onCopyOrder?:(order:OrderProps) => void,
24
24
  onFadeOrder?:(order:OrderProps) => void,
25
- onViewComments:(post_id:string) => void
25
+ onViewComments?:(post_id:string) => void
26
26
  }
27
27
  const PostCard = ({ player_id, post, player, orders, onRequestAuthenticate, onCopyOrder, onFadeOrder, onViewComments }:PostCardProps) => {
28
+ const Colors = useColors();
28
29
  const [ post_data, setPostData ] = useState<{
29
30
  loading:boolean,
30
31
  reactions_loaded:boolean,
@@ -36,6 +37,7 @@ const PostCard = ({ player_id, post, player, orders, onRequestAuthenticate, onCo
36
37
  post_comment_stat: { activity_post_id:post.memo_post_id, comment_count: 0 },
37
38
  post_reaction_stats: []
38
39
  })
40
+
39
41
  const { reactions_loaded, post_reaction_stats, post_comment_stat } = post_data;
40
42
 
41
43
  const [ my_data, setMyData ] = useState<{
@@ -117,28 +119,31 @@ const PostCard = ({ player_id, post, player, orders, onRequestAuthenticate, onCo
117
119
  }
118
120
  }
119
121
 
122
+
120
123
  return (
121
- <View ref={post_ref as any} style={{ ...view_styles.section, padding:0, borderWidth:1, borderColor:Colors.shades.shade600 }}>
124
+ <View float ref={post_ref as any}>
125
+ {player ?
122
126
  <PostHeader
123
127
  player={player}
124
128
  post={post}
125
129
  />
126
- <View style={{ padding:10 }}>
127
- <Text theme='header_2'>{post.title}</Text>
130
+ :<></>}
131
+ <View transparent style={{ padding:10 }}>
132
+ <Text theme='h2'>{post.title}</Text>
133
+ </View>
134
+ <View transparent style={{ padding:10, paddingTop:0, paddingBottom:0 }}>
135
+ <Text theme='description'>{post.body}</Text>
128
136
  </View>
129
- <View style={{ padding:10, paddingTop:0, paddingBottom:0 }}>
130
- <DraftTextViewer
131
- post_id={post.memo_post_id}
132
- formatted_body={post.formatted_body}
133
- view_type='memo'
134
- text_fallback={post.body}
135
- />
137
+ {post.memo_articles && post.memo_articles.length > 0 ?
138
+ <View transparent>
139
+
136
140
  </View>
137
- {post.memo_orders && post.memo_orders.length > 0 ?
141
+ :<></>}
142
+ {player && post.memo_orders && post.memo_orders.length > 0 ?
138
143
  <SocialOrdersList
139
144
  players={[player]}
140
145
  orders={orders}
141
- maxWidth={275}
146
+ maxWidth={300}
142
147
  direction='horizontal'
143
148
  onCopyOrder={onCopyOrder}
144
149
  onFadeOrder={onFadeOrder}
@@ -151,8 +156,8 @@ const PostCard = ({ player_id, post, player, orders, onRequestAuthenticate, onCo
151
156
  width={300}
152
157
  />
153
158
  :<></>}
154
- <View style={{ ...view_styles.section_footer, padding:5, backgroundColor:Colors.shades.white }}>
155
- <View style={{}}>
159
+ <View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
160
+ <View float transparent style={{ padding:5 }}>
156
161
  <PostReactionBar
157
162
  loading={my_data_loading}
158
163
  post_id={post.memo_post_id}
@@ -161,13 +166,15 @@ const PostCard = ({ player_id, post, player, orders, onRequestAuthenticate, onCo
161
166
  onReactionSelect={(r) => handleReaction(r)}
162
167
  />
163
168
  </View>
164
- <TouchableOpacity
169
+ {onViewComments ?
170
+ <Button
165
171
  style={{ flex:1, flexDirection:'row', alignItems:'center', justifyContent:'flex-end' }}
166
172
  onPress={() => onViewComments(post.memo_post_id)}
167
173
  >
168
- <Text style={{ marginRight:4 }} theme='header_2'>{post_comment_stat.comment_count}</Text>
169
- <Icons.ChatIcon size={18} color={Colors.brand.midnight}/>
170
- </TouchableOpacity>
174
+ <Text style={{ marginRight:4 }} theme='h2'>{post_comment_stat.comment_count}</Text>
175
+ <Icons.ChatIcon size={18} color={Colors.text.h1}/>
176
+ </Button>
177
+ :<></>}
171
178
  </View>
172
179
  </View>
173
180
  )
@@ -1,12 +1,12 @@
1
1
  import React, { useState } from 'react';
2
- import { View, Image } from 'react-native';
2
+ import { Image } from 'react-native';
3
3
  import type { AthleteProps, LeagueProps, OrderProps, PublicPlayerProps, TeamProps } from '../types';
4
- import { view_styles } from '../constants/styles';
5
- import { Button, Icons, Text } from '../Components';
4
+ import { Icons } from '../Components';
6
5
  import { SocialComponentApi, SocialOrderHelpers } from './api';
7
- import Colors from '../constants/colors';
8
6
  import moment from 'moment-mini';
9
7
  import { AthleteImage } from '../Components/Jerseys';
8
+ import { View, Button, Text } from '../Components/Themed';
9
+ import { useColors } from '../constants/useColors';
10
10
 
11
11
  type SocialOrderCardProps = {
12
12
  player?:PublicPlayerProps,
@@ -22,6 +22,7 @@ type SocialOrderCardProps = {
22
22
  onFadeOrder?:(order:OrderProps) => void
23
23
  }
24
24
  const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete, order, contest_title, contest_time, onCopyOrder, onFadeOrder }:SocialOrderCardProps) => {
25
+ const Colors = useColors();
25
26
  const [ fade_loading, setFadeLoading ] = useState(false);
26
27
  const { result_label, color } = SocialOrderHelpers.getResultDetails(order)
27
28
 
@@ -50,26 +51,26 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
50
51
  }
51
52
 
52
53
  return (
53
- <View style={{ ...view_styles.section, minWidth:175, maxWidth, borderWidth:1, borderColor:Colors.shades.shade600 }}>
54
+ <View float style={{ minWidth:275, maxWidth }}>
54
55
  {show_player && player ?
55
- <View style={{ ...view_styles.section_header, backgroundColor:Colors.shades.shade100 }}>
56
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
56
57
  <Image
57
58
  source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
58
59
  style={{ height:35, width:35, borderRadius:100 }}
59
60
  resizeMode='cover'
60
61
  />
61
- <View style={{ flex:1, marginLeft:10, marginRight:10 }}>
62
- <Text theme='header'>{player.first_name} {player.last_name}</Text>
63
- <Text theme='body_2' style={{ marginTop:3 }}>@{player.username}</Text>
62
+ <View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
63
+ <Text theme='h1'>{player.first_name} {player.last_name}</Text>
64
+ <Text theme='description' style={{ marginTop:3 }}>@{player.username}</Text>
64
65
  </View>
65
66
  <Text size={14} color={color} weight='bold'>{result_label}</Text>
66
67
  </View>
67
68
  :<></>}
68
- <View style={{ ...view_styles.section_header }}>
69
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
69
70
 
70
- <View style={{ flex:1, marginRight:10 }}>
71
- <Text theme='body_2'>{contest_title}</Text>
72
- <Text style={{ marginTop:3 }} size={12} color={Colors.brand.slate} weight='regular'>{contest_time}</Text>
71
+ <View transparent style={{ flex:1, marginRight:10 }}>
72
+ <Text theme='description'>{contest_title}</Text>
73
+ <Text style={{ marginTop:3 }} size={12} theme='light' weight='regular'>{contest_time}</Text>
73
74
  </View>
74
75
  {league ?
75
76
  <Image
@@ -78,13 +79,13 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
78
79
  resizeMode='cover'
79
80
  />
80
81
  :
81
- <View style={{ height:30, width:30, borderRadius:4, justifyContent:'center', alignItems:'center', backgroundColor:SocialOrderHelpers.getIconColor(order) }}>
82
- <Icons.ActivityIcon size={14} color={Colors.shades.white}/>
82
+ <View transparent style={{ height:30, width:30, borderRadius:4, justifyContent:'center', alignItems:'center', backgroundColor:SocialOrderHelpers.getIconColor(order) }}>
83
+ <Icons.ActivityIcon size={14} color={Colors.text.white}/>
83
84
  </View>
84
85
  }
85
86
  </View>
86
- <View style={{ ...view_styles.section_body, padding:10 }}>
87
- <View style={{ ...view_styles.body_row }}>
87
+ <View type='body' style={{ padding:10 }}>
88
+ <View transparent type='row' style={{ padding:5 }}>
88
89
  {team ?
89
90
  <Image
90
91
  source={{ uri: team.image?.url }}
@@ -97,26 +98,26 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
97
98
  size={16}
98
99
  />
99
100
  :<></>}
100
- <View style={{ flex:1, marginLeft:10, marginRight:10 }}>
101
- <Text theme='header_2'>{order.title}</Text>
102
- <Text style={{ marginTop:3 }} theme='body_2'>Created on {moment(order.create_datetime).format('MM/DD hh:mm a')}</Text>
101
+ <View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
102
+ <Text theme='h2'>{order.title}</Text>
103
+ <Text style={{ marginTop:3 }} theme='description'>Created on {moment(order.create_datetime).format('MM/DD hh:mm a')}</Text>
103
104
  </View>
104
- <View>
105
- <Text theme='header'>{SocialOrderHelpers.getOddsLabel(order.odds)}</Text>
105
+ <View transparent>
106
+ <Text theme='h1'>{SocialOrderHelpers.getOddsLabel(order.odds)}</Text>
106
107
  {!show_player ?
107
- <Text style={{ marginTop:3 }} size={14} color={color} weight='bold'>{result_label}</Text>
108
+ <Text style={{ marginTop:3 }} size={14} color={color} theme='h1'>{result_label}</Text>
108
109
  :<></>}
109
110
  </View>
110
111
  </View>
111
112
  </View>
112
113
  {order.resolution_status == 'inprogress' ?
113
- <View style={{ ...view_styles.body_row, padding:0 }}>
114
+ <View type='row' style={{ padding:0, borderBottomLeftRadius:8, borderBottomRightRadius:8 }}>
114
115
  {onCopyOrder ?
115
116
  <Button
116
117
  style={{ flex:1, borderRadius:0, borderBottomLeftRadius:8 }}
117
118
  title='Copy'
118
- title_color={Colors.shades.white}
119
- backgroundColor={Colors.brand.midnight}
119
+ title_color={Colors.text.white}
120
+ backgroundColor={Colors.absolutes.brand.midnight}
120
121
  onPress={() => onCopyOrder({
121
122
  ...order,
122
123
  buy_sell_ind:'buy',
@@ -139,8 +140,8 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
139
140
  style={{ flex:1, borderRadius:0, borderBottomRightRadius:8, opacity:fade_loading?0.5:1 }}
140
141
  title='Fade'
141
142
  loading={fade_loading}
142
- title_color={Colors.shades.white}
143
- backgroundColor={Colors.brand.cyan}
143
+ title_color={Colors.text.white}
144
+ backgroundColor={Colors.absolutes.brand.cyan}
144
145
  onPress={() => handleFadeOrder()}
145
146
  />
146
147
  :<></>}
@@ -1,8 +1,9 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, FlatList } from 'react-native';
2
+ import { FlatList } from 'react-native';
3
3
  import type { AthleteProps, EventProps, LeagueProps, MatchProps, OrderProps, PublicPlayerProps, TeamProps, TournamentProps } from '../types';
4
4
  import SocialOrderCard from './SocialOrderCard';
5
5
  import { SocialComponentApi, SocialOrderHelpers } from './api';
6
+ import { View } from '../Components/Themed';
6
7
 
7
8
  type SocialOrdersListProps = {
8
9
  players:PublicPlayerProps[],
@@ -5,6 +5,7 @@ import CompanyProfile from './CompanyProfile';
5
5
  import PodcastModule from './PodcastModule';
6
6
  import AudioPlayer from "./AudioPlayer";
7
7
  import { useContacts } from "./Contacts/useContacts";
8
+ import PostCard from './PostCard';
8
9
  export {
9
10
  PlayerCard,
10
11
  PlayerList,
@@ -12,5 +13,6 @@ export {
12
13
  CompanyProfile,
13
14
  PodcastModule,
14
15
  AudioPlayer,
15
- useContacts
16
+ useContacts,
17
+ PostCard
16
18
  }
package/src/index.tsx CHANGED
@@ -37,6 +37,7 @@ import SquaresCompetitionCard from './Engage/components/SquaresCompetitionCard';
37
37
  import BracketCompetitionCard from './Engage/components/BracketCompetitionCard';
38
38
  import SeasonCard from './Engage/components/SeasonCard';
39
39
  import NotificationModule from './Notifications';
40
+ import { useNotifications } from './Notifications/useNotifications';
40
41
 
41
42
  export {
42
43
  Authenticator,
@@ -45,6 +46,7 @@ export {
45
46
  BELinkApi,
46
47
  LocationTracker,
47
48
  NotificationModule,
49
+ useNotifications,
48
50
  ProfileManager,
49
51
  CompetitionManager,
50
52
  Components,