be-components 2.1.2 → 2.1.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/Components/Icons.js +144 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/api/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/api/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerCard.js +7 -6
- package/lib/commonjs/SocialComponents/PlayerCard.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerList.js +1 -0
- package/lib/commonjs/SocialComponents/PlayerList.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerProfile/api/index.js +149 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/api/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.js +138 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js +94 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js +501 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextEntities.js +36 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextEntities.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextViewer.js +59 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/EntityHelpers.js +52 -0
- package/lib/commonjs/SocialComponents/PostCard/components/EntityHelpers.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js +47 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js +113 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/index.js +124 -0
- package/lib/commonjs/SocialComponents/PostCard/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/SocialOrderCard.js +115 -0
- package/lib/commonjs/SocialComponents/SocialOrderCard.js.map +1 -0
- package/lib/commonjs/SocialComponents/SocialOrdersList.js +96 -0
- package/lib/commonjs/SocialComponents/SocialOrdersList.js.map +1 -0
- package/lib/commonjs/SocialComponents/api/index.js +204 -1
- package/lib/commonjs/SocialComponents/api/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/index.js +7 -0
- package/lib/commonjs/SocialComponents/index.js.map +1 -1
- package/lib/module/Components/Icons.js +144 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/api/index.js +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/api/index.js.map +1 -1
- package/lib/module/SocialComponents/PlayerCard.js +7 -6
- package/lib/module/SocialComponents/PlayerCard.js.map +1 -1
- package/lib/module/SocialComponents/PlayerList.js +1 -0
- package/lib/module/SocialComponents/PlayerList.js.map +1 -1
- package/lib/module/SocialComponents/PlayerProfile/api/index.js +143 -0
- package/lib/module/SocialComponents/PlayerProfile/api/index.js.map +1 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.js +129 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.js.map +1 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js +86 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -0
- package/lib/module/SocialComponents/PlayerProfile/index.js +493 -0
- package/lib/module/SocialComponents/PlayerProfile/index.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextEntities.js +27 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextEntities.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextViewer.js +51 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/EntityHelpers.js +41 -0
- package/lib/module/SocialComponents/PostCard/components/EntityHelpers.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/PostHeader.js +40 -0
- package/lib/module/SocialComponents/PostCard/components/PostHeader.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js +104 -0
- package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/index.js +115 -0
- package/lib/module/SocialComponents/PostCard/index.js.map +1 -0
- package/lib/module/SocialComponents/SocialOrderCard.js +108 -0
- package/lib/module/SocialComponents/SocialOrderCard.js.map +1 -0
- package/lib/module/SocialComponents/SocialOrdersList.js +87 -0
- package/lib/module/SocialComponents/SocialOrdersList.js.map +1 -0
- package/lib/module/SocialComponents/api/index.js +204 -1
- package/lib/module/SocialComponents/api/index.js.map +1 -1
- package/lib/module/SocialComponents/index.js +2 -1
- package/lib/module/SocialComponents/index.js.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +5 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts +2 -1
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerList.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/api/index.d.ts +19 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/api/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts +9 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/index.d.ts +9 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextEntities.d.ts +4 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextEntities.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextViewer.d.ts +12 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextViewer.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/EntityHelpers.d.ts +12 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/EntityHelpers.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostHeader.d.ts +9 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostReactionBar.d.ts +11 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/index.d.ts +11 -0
- package/lib/typescript/src/SocialComponents/PostCard/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts +9 -0
- package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/api/index.d.ts +26 -2
- package/lib/typescript/src/SocialComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/index.d.ts +2 -1
- package/lib/typescript/src/SocialComponents/index.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/Components/Icons.tsx +76 -0
- package/src/MarketComponents/components/TeamEventMarket/api/index.ts +1 -1
- package/src/SocialComponents/PlayerCard.tsx +6 -5
- package/src/SocialComponents/PlayerList.tsx +2 -1
- package/src/SocialComponents/PlayerProfile/api/index.ts +138 -0
- package/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.tsx +111 -0
- package/src/SocialComponents/PlayerProfile/components/PostsList.tsx +92 -0
- package/src/SocialComponents/PlayerProfile/index.tsx +380 -0
- package/src/SocialComponents/PostCard/components/DraftTextEntities.tsx +25 -0
- package/src/SocialComponents/PostCard/components/DraftTextViewer.tsx +61 -0
- package/src/SocialComponents/PostCard/components/EntityHelpers.tsx +44 -0
- package/src/SocialComponents/PostCard/components/PostHeader.tsx +29 -0
- package/src/SocialComponents/PostCard/components/PostReactionBar.tsx +75 -0
- package/src/SocialComponents/PostCard/index.tsx +105 -0
- package/src/SocialComponents/SocialOrderCard.tsx +75 -0
- package/src/SocialComponents/SocialOrdersList.tsx +93 -0
- package/src/SocialComponents/api/index.ts +119 -4
- package/src/SocialComponents/index.tsx +3 -2
- package/src/types.d.ts +245 -0
package/src/Components/Icons.tsx
CHANGED
|
@@ -38,6 +38,53 @@ const PodiumIcon = ({ color, size, secondary_color }:IconProps) => {
|
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
|
|
42
|
+
const TwitterIcon = ({ size }:IconProps) => {
|
|
43
|
+
const icon_size = size ?? 20
|
|
44
|
+
return (
|
|
45
|
+
<svg width={`${icon_size}px`} height={`${icon_size}px`} viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
46
|
+
<title>twitter-svgrepo-com</title>
|
|
47
|
+
<g id="ss" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
48
|
+
<g id="twitter-svgrepo-com">
|
|
49
|
+
<circle id="Oval" fill="#1DA1F2" fill-rule="nonzero" cx="12" cy="12" r="12"></circle>
|
|
50
|
+
<path d="M19.2,7.38516 C18.67062,7.62036 18.10086,7.77876 17.50332,7.85028 C18.11334,7.48452 18.58182,6.9057 18.80208,6.216 C18.2319,6.55482 17.59884,6.8001 16.92642,6.93306 C16.38738,6.35904 15.61896,6 14.7699,6 C13.1385,6 11.81568,7.32282 11.81568,8.95422 C11.81568,9.18552 11.84208,9.41112 11.89248,9.6276 C9.43698,9.50472 7.2603,8.3283 5.80314,6.5409 C5.54874,6.97722 5.4033,7.48452 5.4033,8.02596 C5.4033,9.0507 5.9241,9.95496 6.71748,10.48482 C6.23268,10.46946 5.7777,10.3365 5.37882,10.11522 L5.37882,10.15218 C5.37882,11.58396 6.3978,12.7776 7.74846,13.04976 C7.50078,13.11696 7.23966,13.15344 6.97044,13.15344 C6.77988,13.15344 6.5946,13.13472 6.41412,13.10016 C6.78996,14.2737 7.88142,15.12804 9.17394,15.15204 C8.16312,15.94398 6.88932,16.41672 5.50506,16.41672 C5.26602,16.41672 5.03088,16.4028 4.8,16.37496 C6.10746,17.21304 7.66014,17.70258 9.3285,17.70258 C14.76222,17.70258 17.73372,13.20096 17.73372,9.29736 C17.73372,9.1692 17.73132,9.04158 17.72508,8.91534 C18.30294,8.49774 18.804,7.97748 19.2,7.38516 Z" id="Path" fill="#FFFFFF"></path>
|
|
51
|
+
</g>
|
|
52
|
+
</g>
|
|
53
|
+
</svg>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const LinkedInIcon = ({ size }:IconProps) => {
|
|
58
|
+
const icon_size = size ?? 20
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<svg width={`${icon_size}px`} height={`${icon_size}px`} viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
62
|
+
<title>linkedin-svgrepo-com</title>
|
|
63
|
+
<g id="ss" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
64
|
+
<g id="linkedin-svgrepo-com">
|
|
65
|
+
<circle id="Oval" fill="#0077B5" fill-rule="nonzero" cx="12" cy="12" r="12"></circle>
|
|
66
|
+
<path d="M8.86482,6.17034 C8.86482,6.9174 8.29602,7.52196 7.40652,7.52196 C6.55164,7.52196 5.98278,6.9174 6.00042,6.17034 C5.98278,5.38698 6.55158,4.8 7.42356,4.8 C8.29602,4.8 8.84778,5.38698 8.86482,6.17034 Z M6.07194,17.29146 L6.07194,8.58972 L8.77626,8.58972 L8.77626,17.29086 L6.07194,17.29086 L6.07194,17.29146 Z" id="Shape" fill="#FFFFFF"></path>
|
|
67
|
+
<path d="M10.94358,11.36676 C10.94358,10.28142 10.90782,9.3561 10.87206,8.59092 L13.22106,8.59092 L13.34592,9.783 L13.39932,9.783 C13.75524,9.23124 14.64474,8.39562 16.08606,8.39562 C17.86512,8.39562 19.1997,9.57012 19.1997,12.1314 L19.1997,17.2926 L16.49532,17.2926 L16.49532,12.47028 C16.49532,11.34864 16.10424,10.58394 15.12558,10.58394 C14.37798,10.58394 13.93344,11.09994 13.75578,11.59782 C13.68426,11.77608 13.64904,12.02472 13.64904,12.27444 L13.64904,17.2926 L10.94466,17.2926 L10.94466,11.36676 L10.94358,11.36676 Z" id="Path" fill="#FFFFFF"></path>
|
|
68
|
+
</g>
|
|
69
|
+
</g>
|
|
70
|
+
</svg>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const LinkIcon = ({ size, color }:IconProps) => {
|
|
75
|
+
const icon_size = size ?? 20
|
|
76
|
+
return (
|
|
77
|
+
<svg width={`${icon_size}px`} height={`${icon_size}px`} viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
78
|
+
<title>link-circle-svgrepo-com</title>
|
|
79
|
+
<g id="ss" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
80
|
+
<g id="link-circle-svgrepo-com" fill={color ?? Colors.brand.midnight}>
|
|
81
|
+
<path d="M1.757364,22.2426 C3.514716,24 6.34314,24 12,24 C17.6568,24 20.48532,24 22.2426,22.2426 C24,20.48532 24,17.6568 24,12 C24,6.34314 24,3.514716 22.2426,1.757364 C20.48532,0 17.6568,0 12,0 C6.34314,0 3.514716,0 1.757364,1.757364 C0,3.514716 0,6.34314 0,12 C0,17.6568 0,20.48532 1.757364,22.2426 Z M9,8.1 C6.846084,8.1 5.1,9.84612 5.1,12 C5.1,14.15388 6.846084,15.9 9,15.9 C11.15388,15.9 12.9,14.15388 12.9,12 C12.9,11.50296 13.30296,11.1 13.8,11.1 C14.29704,11.1 14.7,11.50296 14.7,12 C14.7,15.14808 12.14808,17.7 9,17.7 C5.85198,17.7 3.3,15.14808 3.3,12 C3.3,8.85198 5.85198,6.3 9,6.3 C9.497052,6.3 9.9,6.702948 9.9,7.2 C9.9,7.697052 9.497052,8.1 9,8.1 Z M18.9,12 C18.9,14.15388 17.15388,15.9 15,15.9 C14.50296,15.9 14.1,16.30296 14.1,16.8 C14.1,17.29704 14.50296,17.7 15,17.7 C18.14808,17.7 20.7,15.14808 20.7,12 C20.7,8.85198 18.14808,6.3 15,6.3 C11.85192,6.3 9.3,8.85198 9.3,12 C9.3,12.49704 9.70296,12.9 10.2,12.9 C10.69704,12.9 11.1,12.49704 11.1,12 C11.1,9.84612 12.84612,8.1 15,8.1 C17.15388,8.1 18.9,9.84612 18.9,12 Z" id="Shape"></path>
|
|
82
|
+
</g>
|
|
83
|
+
</g>
|
|
84
|
+
</svg>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
41
88
|
const FlameIcon = ({ size, color }:IconProps) => {
|
|
42
89
|
const ratio = 0.857
|
|
43
90
|
const height = size??30
|
|
@@ -339,6 +386,22 @@ const EdgeCoinIcon = ({ color, size }:IconProps) => {
|
|
|
339
386
|
)
|
|
340
387
|
}
|
|
341
388
|
|
|
389
|
+
const ActivityIcon = ({ color, size }:IconProps) => {
|
|
390
|
+
const ratio = 0.7857
|
|
391
|
+
let width = size ?? 14
|
|
392
|
+
let height = width * ratio
|
|
393
|
+
return (
|
|
394
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 28 22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
395
|
+
<title>activity-svgrepo-com</title>
|
|
396
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
|
397
|
+
<g id="activity-svgrepo-com" transform="translate(2.000000, 2.000000)" stroke={color ?? Colors.brand.midnight} stroke-width="3">
|
|
398
|
+
<path d="M0,9.80125802 L4.71504,9.80125802 C4.97052,9.80125802 5.19735429,9.63771516 5.27814857,9.39531516 L5.27814857,9.39531516 L8.35714286,0.158400878 L8.35714286,0.158400878 C8.42787429,-0.0537934081 8.7288,-0.0518048366 8.80525714,0.158400878 L8.80525714,0.158400878 L15.2142857,17.7833152 L15.2314286,17.830458 C15.3005143,18.0205723 15.5677714,18.0246866 15.6428571,17.8369723 L15.6428571,17.8369723 L18.6584571,10.298058 L18.6584571,10.298058 C18.7784571,9.99805802 19.0690286,9.80125802 19.3923429,9.80125802 L24,9.80125802" id="Path"></path>
|
|
399
|
+
</g>
|
|
400
|
+
</g>
|
|
401
|
+
</svg>
|
|
402
|
+
)
|
|
403
|
+
}
|
|
404
|
+
|
|
342
405
|
const ChangeIcon = ({ color, size }:IconProps) => {
|
|
343
406
|
let icon_size = size ?? 14
|
|
344
407
|
|
|
@@ -1222,6 +1285,14 @@ const MarketClosedIcon = ({color, size}:IconProps) => {
|
|
|
1222
1285
|
)
|
|
1223
1286
|
}
|
|
1224
1287
|
|
|
1288
|
+
const ChatIcon = ({ color, size }:IconProps) => {
|
|
1289
|
+
return (
|
|
1290
|
+
<svg width={`${size ?? 18}`} height={`${size ?? 18}`} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1291
|
+
<path d="M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7" stroke={color ?? Colors.brand.midnight} stroke-width="1.5" stroke-linecap="round"/>
|
|
1292
|
+
</svg>
|
|
1293
|
+
)
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1225
1296
|
const QuestionIcon = ({ color, size }:IconProps) => {
|
|
1226
1297
|
return (
|
|
1227
1298
|
<svg width={`${size ?? 18}`} height={`${size ?? 18}`} viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1304,6 +1375,9 @@ export default {
|
|
|
1304
1375
|
TrophyIcon,
|
|
1305
1376
|
ListIcon,
|
|
1306
1377
|
UserIcon,
|
|
1378
|
+
TwitterIcon,
|
|
1379
|
+
LinkedInIcon,
|
|
1380
|
+
LinkIcon,
|
|
1307
1381
|
PhoneIcon,
|
|
1308
1382
|
EmailIcon,
|
|
1309
1383
|
NotificationIcon,
|
|
@@ -1332,6 +1406,7 @@ export default {
|
|
|
1332
1406
|
SettingsIcon,
|
|
1333
1407
|
PayPalIcon,
|
|
1334
1408
|
ChevronIcon,
|
|
1409
|
+
ActivityIcon,
|
|
1335
1410
|
ShareSocialIcon,
|
|
1336
1411
|
EdgeCoinIcon,
|
|
1337
1412
|
PacerCarIcon,
|
|
@@ -1343,6 +1418,7 @@ export default {
|
|
|
1343
1418
|
USDIcon,
|
|
1344
1419
|
EyeOffIcon,
|
|
1345
1420
|
DiscoverCardIcon,
|
|
1421
|
+
ChatIcon,
|
|
1346
1422
|
AmexCardIcon,
|
|
1347
1423
|
TransactionIcon,
|
|
1348
1424
|
FlameIcon,
|
|
@@ -66,7 +66,7 @@ const TeamEventMarketHelpers = {
|
|
|
66
66
|
},
|
|
67
67
|
getEventStatus: (event:EventProps):'active'|'closed'|'inactive' => {
|
|
68
68
|
let status:'active'|'closed'|'inactive' = 'active'
|
|
69
|
-
if(['postponed','cancelled','canceled','complete','completed','closed','suspended'].includes(event.status)){ status = 'closed' }
|
|
69
|
+
if(['unnecessary','postponed','cancelled','canceled','complete','completed','closed','suspended'].includes(event.status)){ status = 'closed' }
|
|
70
70
|
if(status == 'active' && !event.is_active){ status = 'inactive' }
|
|
71
71
|
return status
|
|
72
72
|
}
|
|
@@ -15,31 +15,32 @@ type PlayerCardProps = {
|
|
|
15
15
|
player_following?:PlayerFollowerProps,
|
|
16
16
|
show_follow?:boolean,
|
|
17
17
|
style?:any,
|
|
18
|
+
border?:boolean,
|
|
18
19
|
float?:boolean,
|
|
19
20
|
onSelectPlayer:(p:PublicPlayerProps) => void,
|
|
20
21
|
onFollowingUpdate:(pf:PlayerFollowerProps) => void
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
const PlayerCard = ({ player, width, follow_loading, alignment, style, float, show_follow, player_follower, player_following, onSelectPlayer, onFollowingUpdate }:PlayerCardProps) => {
|
|
24
|
+
const PlayerCard = ({ player, width, border, follow_loading, alignment, style, float, show_follow, player_follower, player_following, onSelectPlayer, onFollowingUpdate }:PlayerCardProps) => {
|
|
24
25
|
|
|
25
26
|
let player_style = alignment == 'vertical' ? local_styles.player_vertical : local_styles.player_horizontal;
|
|
26
27
|
let container_style = { ...local_styles.container }
|
|
27
28
|
if(float){ container_style = { ...container_style, ...view_styles.float } }
|
|
28
29
|
return (
|
|
29
|
-
<View style={{ ...container_style, ...style, width }}>
|
|
30
|
+
<View style={{ ...container_style, ...style, width, borderWidth: border?1:0, borderColor:Colors.shades.shade600 }}>
|
|
30
31
|
<TouchableOpacity style={player_style} onPress={() => onSelectPlayer(player)}>
|
|
31
32
|
{alignment == 'vertical' ?
|
|
32
33
|
<View>
|
|
33
34
|
<Image
|
|
34
|
-
source={{ uri: player.profile_pic }}
|
|
35
|
+
source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
35
36
|
style={{ height:width * 0.5, width:width, borderTopRightRadius:8, borderTopLeftRadius:8 }}
|
|
36
37
|
resizeMode='cover'
|
|
37
38
|
/>
|
|
38
39
|
</View>
|
|
39
40
|
:
|
|
40
|
-
<View
|
|
41
|
+
<View>
|
|
41
42
|
<Image
|
|
42
|
-
source={{ uri: player.profile_pic }}
|
|
43
|
+
source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
43
44
|
style={{ height:55, width:55, borderTopLeftRadius:8, borderBottomLeftRadius:8}}
|
|
44
45
|
resizeMode='cover'
|
|
45
46
|
/>
|
|
@@ -31,7 +31,8 @@ const PlayerList = ({ players, style, options, onPlayerSelect }:PlayerListProps)
|
|
|
31
31
|
const getListData = async() => {
|
|
32
32
|
if(follow_status){
|
|
33
33
|
setFollowStatusLoading(true);
|
|
34
|
-
const player_followers = await SocialComponentApi.getBulkPlayerfollowers(players.map(p => p.player_id))
|
|
34
|
+
const player_followers = await SocialComponentApi.getBulkPlayerfollowers(players.map(p => p.player_id));
|
|
35
|
+
console.log(player_followers)
|
|
35
36
|
setPlayerFollowers(player_followers)
|
|
36
37
|
setFollowStatusLoading(false);
|
|
37
38
|
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { APIOverrides } from "../../../ApiOverrides";
|
|
3
|
+
import type { OrderProps, PlayerFollowerProps, PlayerFollowerStatsProps, PlayerLinkProps, PostCommentStatProps, PostProps, PostReactionProps, PublicPlayerProps } from "../../../types";
|
|
4
|
+
|
|
5
|
+
let SOCIAL_SVC_API = '';
|
|
6
|
+
let AUTH_SVC_API = '';
|
|
7
|
+
let MK_SVC_API = '';
|
|
8
|
+
|
|
9
|
+
export { SocialProfileApi }
|
|
10
|
+
|
|
11
|
+
const SocialProfileApi = {
|
|
12
|
+
setEnvironment: () => {
|
|
13
|
+
const endpoints = APIOverrides.getEndpoints();
|
|
14
|
+
SOCIAL_SVC_API = endpoints['SOCIAL_SVC_API'] as string;
|
|
15
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
|
|
16
|
+
MK_SVC_API = endpoints['MK_SVC_API'] as string;
|
|
17
|
+
},
|
|
18
|
+
getPlayerById: async(player_id:string):Promise<PublicPlayerProps | undefined> => {
|
|
19
|
+
try {
|
|
20
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/players/player/${player_id}`);
|
|
21
|
+
return resp.data.player
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.log(e);
|
|
24
|
+
return undefined
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
getPlayerLinksByPlayerId: async(player_id:string):Promise<PlayerLinkProps[]> => {
|
|
28
|
+
try {
|
|
29
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/links/player/${player_id}`);
|
|
30
|
+
return resp.data.player_links
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.log(e);
|
|
33
|
+
return []
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
getFollowerStats:async(player_id:string):Promise<PlayerFollowerStatsProps | undefined> => {
|
|
37
|
+
try {
|
|
38
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/followers/stats/player/${player_id}`)
|
|
39
|
+
const { player_follower_stats } = resp.data;
|
|
40
|
+
return player_follower_stats
|
|
41
|
+
} catch (e) {
|
|
42
|
+
console.log(e)
|
|
43
|
+
return undefined
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
getFollowerStatus: async(player_id:string, following_id:string):Promise<PlayerFollowerProps | undefined> => {
|
|
47
|
+
try {
|
|
48
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/followers/status?player_id=${player_id}&following_id=${following_id}`);
|
|
49
|
+
console.log(resp.data)
|
|
50
|
+
return resp.data.player_follower
|
|
51
|
+
} catch (e) {
|
|
52
|
+
console.log(e)
|
|
53
|
+
return undefined
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
getPostsByPlayerId: async(player_id:string, offset:number):Promise<PostProps[]> => {
|
|
57
|
+
try {
|
|
58
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/posts/player/${player_id}?offset=${offset}`)
|
|
59
|
+
return resp.data.posts
|
|
60
|
+
} catch (e) {
|
|
61
|
+
console.log(e);
|
|
62
|
+
return []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
getPlayerFollowersByPlayerId: async(player_id:string, status:'following'|'followers', offset:number):Promise<PlayerFollowerProps[]> => {
|
|
66
|
+
try {
|
|
67
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/followers/player/${player_id}?status=${status}&offset=${offset}`)
|
|
68
|
+
console.log(resp.data);
|
|
69
|
+
return resp.data.player_followers
|
|
70
|
+
} catch (e) {
|
|
71
|
+
console.log(e);
|
|
72
|
+
return []
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
getCommentStatsByPostId: async(post_id:string, post_type:'memo'):Promise<PostCommentStatProps | undefined> => {
|
|
76
|
+
try {
|
|
77
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/posts/comments/stats/post/${post_id}?post_type=${post_type}`)
|
|
78
|
+
console.log(resp.data)
|
|
79
|
+
return resp.data.post_comment_stat
|
|
80
|
+
} catch (e) {
|
|
81
|
+
return undefined
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
getReactionStatsByPostId: async(post_id:string, post_type:'memo') => {
|
|
85
|
+
try {
|
|
86
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/posts/reactions/stats/post/${post_id}?post_type=${post_type}`)
|
|
87
|
+
return resp.data.post_reaction_stats
|
|
88
|
+
} catch (e) {
|
|
89
|
+
console.log(e)
|
|
90
|
+
return []
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
getReactionsByPostAndPlayer: async(player_id:string, post_id:string, post_type:'memo'):Promise<PostReactionProps[]> => {
|
|
94
|
+
try {
|
|
95
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/posts/reactions/post/${post_id}?player_id=${player_id}&post_type=${post_type}`)
|
|
96
|
+
return resp.data.post_reactions
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.log(e);
|
|
99
|
+
return []
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
createPostReaction: async(post_reaction:PostReactionProps):Promise<PostReactionProps|undefined> => {
|
|
103
|
+
try {
|
|
104
|
+
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/posts/reaction/create`, { post_reaction });
|
|
105
|
+
return resp.data.post_reaction
|
|
106
|
+
} catch (e) {
|
|
107
|
+
console.log(e);
|
|
108
|
+
return undefined
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
updatePostReaction : async(post_reaction:PostReactionProps):Promise<PostReactionProps|undefined> => {
|
|
112
|
+
try {
|
|
113
|
+
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/posts/reaction/update`, { post_reaction })
|
|
114
|
+
return resp.data.post_reaction
|
|
115
|
+
} catch (e) {
|
|
116
|
+
console.log(e)
|
|
117
|
+
return undefined
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
getBulkOrders: async(order_ids:string[]):Promise<OrderProps[]> => {
|
|
121
|
+
try {
|
|
122
|
+
const resp = await axios.post(`${MK_SVC_API}/v1/orders/bulk/get`, { order_ids })
|
|
123
|
+
return resp.data.orders
|
|
124
|
+
} catch (e) {
|
|
125
|
+
console.log(e);
|
|
126
|
+
return []
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
getOrdersByPlayerId: async(player_id:string, offset:number):Promise<OrderProps[]> => {
|
|
130
|
+
try {
|
|
131
|
+
const resp = await axios.get(`${MK_SVC_API}/v1/orders/player/${player_id}?offset=${offset}`)
|
|
132
|
+
return resp.data.orders
|
|
133
|
+
} catch (e) {
|
|
134
|
+
console.log(e);
|
|
135
|
+
return []
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { View, ActivityIndicator, ScrollView, Image } from 'react-native';
|
|
3
|
+
import type { PlayerFollowerProps, PublicPlayerProps } from '../../../types';
|
|
4
|
+
import { SocialProfileApi } from '../api';
|
|
5
|
+
import Colors from '../../../constants/colors';
|
|
6
|
+
import { view_styles } from '../../../constants/styles';
|
|
7
|
+
import { Button, Text } from '../../../Components';
|
|
8
|
+
import PlayerList from '../../PlayerList';
|
|
9
|
+
|
|
10
|
+
type PlayerFollowersListProps = {
|
|
11
|
+
status: 'following'|'followers',
|
|
12
|
+
viewing_player:PublicPlayerProps,
|
|
13
|
+
total?:number,
|
|
14
|
+
player_id?:string,
|
|
15
|
+
height?:number,
|
|
16
|
+
onClose:() => void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const PlayerFollowersList = ({ status, total, height, viewing_player, player_id, onClose }:PlayerFollowersListProps) => {
|
|
20
|
+
const [ list_data, setData ] = useState<{
|
|
21
|
+
loading:boolean,
|
|
22
|
+
player_followers:PlayerFollowerProps[],
|
|
23
|
+
offset:number
|
|
24
|
+
}>({
|
|
25
|
+
loading:false,
|
|
26
|
+
player_followers:[],
|
|
27
|
+
offset:0
|
|
28
|
+
});
|
|
29
|
+
const { loading, player_followers, offset } = list_data;
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
getDataFromServer(0);
|
|
33
|
+
},[]);
|
|
34
|
+
|
|
35
|
+
const getDataFromServer = async(offset:number) => {
|
|
36
|
+
if(loading){ return } //No mashy mashy
|
|
37
|
+
setData({ ...list_data, loading:true });
|
|
38
|
+
let pfs = await SocialProfileApi.getPlayerFollowersByPlayerId(viewing_player.player_id, status, offset);
|
|
39
|
+
setData({
|
|
40
|
+
...list_data,
|
|
41
|
+
loading:false,
|
|
42
|
+
player_followers:pfs,
|
|
43
|
+
offset
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View style={{ height, ...view_styles.section }}>
|
|
50
|
+
<View style={{ ...view_styles.section_header }}>
|
|
51
|
+
<Image
|
|
52
|
+
source={{ uri: viewing_player.profile_pic && viewing_player.profile_pic != '' ? viewing_player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
53
|
+
style={{ width: 32, height: 32, borderRadius:100 }}
|
|
54
|
+
resizeMode='cover'
|
|
55
|
+
/>
|
|
56
|
+
<View style={{flex:1, marginLeft:10 }}>
|
|
57
|
+
<Text theme='header'>{status}</Text>
|
|
58
|
+
<Text style={{ marginTop:3 }} theme='body'>{status == 'followers' ? `@${viewing_player.username} Followers`: `Players @${viewing_player.username} is following`}</Text>
|
|
59
|
+
</View>
|
|
60
|
+
{total ?
|
|
61
|
+
<Text theme='header'>{total}</Text>
|
|
62
|
+
:<></>}
|
|
63
|
+
</View>
|
|
64
|
+
<ScrollView style={{ ...view_styles.section_body }}>
|
|
65
|
+
{loading ?
|
|
66
|
+
<ActivityIndicator
|
|
67
|
+
size={'large'}
|
|
68
|
+
color={Colors.brand.midnight}
|
|
69
|
+
style={{ padding:10, alignSelf:'center' }}
|
|
70
|
+
/>
|
|
71
|
+
:<></>}
|
|
72
|
+
<PlayerList
|
|
73
|
+
players={player_followers.map(pf => pf.playerDetails as PublicPlayerProps)}
|
|
74
|
+
onPlayerSelect={(p) => console.log(p)}
|
|
75
|
+
options={{
|
|
76
|
+
direction: 'horizontal',
|
|
77
|
+
follow_status: player_id?true:false
|
|
78
|
+
}}
|
|
79
|
+
/>
|
|
80
|
+
</ScrollView>
|
|
81
|
+
<View style={{ ...view_styles.section_footer }}>
|
|
82
|
+
{offset > 0 ?
|
|
83
|
+
<Button
|
|
84
|
+
title='PREV'
|
|
85
|
+
title_color={Colors.brand.electric}
|
|
86
|
+
backgroundColor='transparent'
|
|
87
|
+
onPress={() => getDataFromServer(offset - 1)}
|
|
88
|
+
/>
|
|
89
|
+
:<View/>}
|
|
90
|
+
<View style={{ flex:1 }} />
|
|
91
|
+
<Button
|
|
92
|
+
title='NEXT'
|
|
93
|
+
title_color={Colors.brand.electric}
|
|
94
|
+
backgroundColor='transparent'
|
|
95
|
+
onPress={() => getDataFromServer(offset + 1)}
|
|
96
|
+
/>
|
|
97
|
+
</View>
|
|
98
|
+
<View style={{ ...view_styles.section_footer }}>
|
|
99
|
+
<Button
|
|
100
|
+
style={{ flex:1 }}
|
|
101
|
+
title='CLOSE'
|
|
102
|
+
title_color={Colors.shades.white}
|
|
103
|
+
backgroundColor={Colors.utility.error}
|
|
104
|
+
onPress={() => onClose()}
|
|
105
|
+
/>
|
|
106
|
+
</View>
|
|
107
|
+
</View>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export default PlayerFollowersList
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, FlatList, ActivityIndicator } from 'react-native';
|
|
3
|
+
import { useEffect, useState } from "react"
|
|
4
|
+
import type { OrderProps, PostProps, PublicPlayerProps } from "../../../types"
|
|
5
|
+
import { SocialProfileApi } from '../api';
|
|
6
|
+
import PostCard from '../../PostCard';
|
|
7
|
+
import Colors from '../../../constants/colors';
|
|
8
|
+
|
|
9
|
+
type PostsListProps = {
|
|
10
|
+
viewing_player:PublicPlayerProps,
|
|
11
|
+
player_id?:string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const PostsList = ({ viewing_player, player_id }:PostsListProps) => {
|
|
15
|
+
const [ post_data, setPostData ] = useState<{
|
|
16
|
+
posts_loading:boolean,
|
|
17
|
+
posts:PostProps[],
|
|
18
|
+
orders:OrderProps[],
|
|
19
|
+
posts_offset:number
|
|
20
|
+
}>({
|
|
21
|
+
posts_loading: false,
|
|
22
|
+
posts:[],
|
|
23
|
+
orders:[],
|
|
24
|
+
posts_offset:0
|
|
25
|
+
});
|
|
26
|
+
const { posts_loading, posts, orders } = post_data;
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
getPostData(0);
|
|
30
|
+
},[]);
|
|
31
|
+
|
|
32
|
+
const getPostData = async(offset:number) => {
|
|
33
|
+
setPostData({ ...post_data, posts_loading:true });
|
|
34
|
+
let os:OrderProps[] = []
|
|
35
|
+
const ps = await SocialProfileApi.getPostsByPlayerId(viewing_player.player_id, offset);
|
|
36
|
+
|
|
37
|
+
//Now we need to get the data within the posts!
|
|
38
|
+
let order_ids:string[] = []
|
|
39
|
+
ps.map(p => {
|
|
40
|
+
if(p.memo_orders && p.memo_orders.length > 0){ order_ids = order_ids.concat(p.memo_orders) }
|
|
41
|
+
})
|
|
42
|
+
if(order_ids.length > 0){ os = await SocialProfileApi.getBulkOrders(order_ids) }
|
|
43
|
+
|
|
44
|
+
//Now we need to get all the event data from the
|
|
45
|
+
|
|
46
|
+
setPostData({
|
|
47
|
+
...post_data,
|
|
48
|
+
posts_loading:false,
|
|
49
|
+
posts: ps,
|
|
50
|
+
orders:os,
|
|
51
|
+
posts_offset: offset
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
const renderPosts = (data: { item:PostProps, index:number }) => {
|
|
57
|
+
const post_orders = data.item.memo_orders ? orders.filter(o => data.item.memo_orders.includes(o.order_id)) : []
|
|
58
|
+
return (
|
|
59
|
+
<View>
|
|
60
|
+
<PostCard
|
|
61
|
+
player={viewing_player}
|
|
62
|
+
orders={post_orders}
|
|
63
|
+
post={data.item}
|
|
64
|
+
player_id={player_id}
|
|
65
|
+
/>
|
|
66
|
+
</View>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<View>
|
|
73
|
+
<View>
|
|
74
|
+
{posts_loading ?
|
|
75
|
+
<ActivityIndicator size='large' color={Colors.brand.midnight} style={{ padding:10, alignSelf:'center' }} />
|
|
76
|
+
:<></>}
|
|
77
|
+
<FlatList
|
|
78
|
+
key={'player_posts'}
|
|
79
|
+
data={posts}
|
|
80
|
+
renderItem={renderPosts}
|
|
81
|
+
keyExtractor={(item) => item.memo_post_id?.toString()}
|
|
82
|
+
/>
|
|
83
|
+
</View>
|
|
84
|
+
</View>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default React.memo(PostsList, (left,right) => {
|
|
89
|
+
if(left.viewing_player?.player_id != right.viewing_player?.player_id){ return false }
|
|
90
|
+
if(left.player_id != right.player_id){ return false }
|
|
91
|
+
return true
|
|
92
|
+
})
|