be-components 3.8.6 → 3.8.8
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/Themed.js +6 -0
- package/lib/commonjs/Components/Themed.js.map +1 -1
- package/lib/commonjs/Components/Toggle.js +0 -1
- package/lib/commonjs/Components/Toggle.js.map +1 -1
- package/lib/commonjs/SocialComponents/ArticleCard.js +31 -22
- package/lib/commonjs/SocialComponents/ArticleCard.js.map +1 -1
- package/lib/commonjs/SocialComponents/CompanyProfile/index.js +300 -267
- package/lib/commonjs/SocialComponents/CompanyProfile/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerCard.js +31 -41
- package/lib/commonjs/SocialComponents/PlayerCard.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerList.js +9 -8
- package/lib/commonjs/SocialComponents/PlayerList.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.js +36 -43
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js +384 -356
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/PodcastCard.js +14 -12
- package/lib/commonjs/SocialComponents/PodcastCard.js.map +1 -1
- package/lib/commonjs/SocialComponents/PodcastModule/index.js +0 -1
- package/lib/commonjs/SocialComponents/PodcastModule/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/SocialOrdersList.js +5 -1
- package/lib/commonjs/SocialComponents/SocialOrdersList.js.map +1 -1
- package/lib/commonjs/constants/useColors.js +2 -0
- package/lib/commonjs/constants/useColors.js.map +1 -1
- package/lib/module/Components/Themed.js +6 -0
- package/lib/module/Components/Themed.js.map +1 -1
- package/lib/module/Components/Toggle.js +0 -1
- package/lib/module/Components/Toggle.js.map +1 -1
- package/lib/module/SocialComponents/ArticleCard.js +27 -18
- package/lib/module/SocialComponents/ArticleCard.js.map +1 -1
- package/lib/module/SocialComponents/CompanyProfile/index.js +297 -264
- package/lib/module/SocialComponents/CompanyProfile/index.js.map +1 -1
- package/lib/module/SocialComponents/PlayerCard.js +25 -35
- package/lib/module/SocialComponents/PlayerCard.js.map +1 -1
- package/lib/module/SocialComponents/PlayerList.js +8 -7
- package/lib/module/SocialComponents/PlayerList.js.map +1 -1
- package/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.js +28 -35
- package/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.js.map +1 -1
- package/lib/module/SocialComponents/PlayerProfile/index.js +382 -355
- package/lib/module/SocialComponents/PlayerProfile/index.js.map +1 -1
- package/lib/module/SocialComponents/PodcastCard.js +11 -9
- package/lib/module/SocialComponents/PodcastCard.js.map +1 -1
- package/lib/module/SocialComponents/PodcastModule/index.js +0 -1
- package/lib/module/SocialComponents/PodcastModule/index.js.map +1 -1
- package/lib/module/SocialComponents/SocialOrdersList.js +5 -1
- package/lib/module/SocialComponents/SocialOrdersList.js.map +1 -1
- package/lib/module/constants/useColors.js +2 -0
- package/lib/module/constants/useColors.js.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Themed.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/ArticleCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/CompanyProfile/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerCard.d.ts +1 -3
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerList.d.ts +1 -2
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts +2 -2
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerProfile/index.d.ts +1 -2
- package/lib/typescript/lib/commonjs/SocialComponents/PlayerProfile/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/PodcastCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/PodcastModule/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/SocialComponents/SocialOrdersList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/constants/useColors.d.ts +1 -0
- package/lib/typescript/lib/commonjs/constants/useColors.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Themed.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/ArticleCard.d.ts +1 -2
- package/lib/typescript/lib/module/SocialComponents/ArticleCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/CompanyProfile/index.d.ts +1 -2
- package/lib/typescript/lib/module/SocialComponents/CompanyProfile/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PlayerCard.d.ts +2 -5
- package/lib/typescript/lib/module/SocialComponents/PlayerCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PlayerList.d.ts +2 -4
- package/lib/typescript/lib/module/SocialComponents/PlayerList.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts +3 -4
- package/lib/typescript/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PlayerProfile/index.d.ts +2 -5
- package/lib/typescript/lib/module/SocialComponents/PlayerProfile/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PodcastCard.d.ts +1 -2
- package/lib/typescript/lib/module/SocialComponents/PodcastCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/PodcastModule/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts.map +1 -1
- package/lib/typescript/lib/module/constants/useColors.d.ts +1 -0
- package/lib/typescript/lib/module/constants/useColors.d.ts.map +1 -1
- package/lib/typescript/src/Components/Themed.d.ts +1 -1
- package/lib/typescript/src/Components/Themed.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/ArticleCard.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/CompanyProfile/index.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts +2 -4
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerList.d.ts +2 -2
- package/lib/typescript/src/SocialComponents/PlayerList.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts +2 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/index.d.ts +3 -4
- package/lib/typescript/src/SocialComponents/PlayerProfile/index.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PodcastCard.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PodcastModule/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/useColors.d.ts +1 -0
- package/lib/typescript/src/constants/useColors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Components/Themed.tsx +7 -1
- package/src/Components/Toggle.tsx +1 -1
- package/src/SocialComponents/ArticleCard.tsx +15 -20
- package/src/SocialComponents/CompanyProfile/index.tsx +186 -160
- package/src/SocialComponents/PlayerCard.tsx +18 -24
- package/src/SocialComponents/PlayerList.tsx +6 -7
- package/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.tsx +25 -33
- package/src/SocialComponents/PlayerProfile/index.tsx +228 -221
- package/src/SocialComponents/PodcastCard.tsx +8 -9
- package/src/SocialComponents/PodcastModule/index.tsx +0 -1
- package/src/SocialComponents/SocialOrdersList.tsx +1 -1
- package/src/constants/useColors.tsx +2 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ActivityIndicator, Image, FlatList } from 'react-native';
|
|
3
3
|
import { CompanyProfileApi, CompanyProfileHelpers } from './api';
|
|
4
|
-
import
|
|
5
|
-
import { Icons, Text } from '../../Components';
|
|
6
|
-
import { view_styles } from '../../constants/styles';
|
|
4
|
+
import { Icons, Toggle } from '../../Components';
|
|
7
5
|
import PlayerCard from '../PlayerCard';
|
|
8
6
|
import CompetitionCard from '../../Engage/components/CompetitionCard';
|
|
9
7
|
import BracketCompetitionCard from '../../Engage/components/BracketCompetitionCard';
|
|
@@ -11,6 +9,9 @@ import SquaresCompetitionCard from '../../Engage/components/SquaresCompetitionCa
|
|
|
11
9
|
import ArticleCard from '../ArticleCard';
|
|
12
10
|
import PodcastCard from '../PodcastCard';
|
|
13
11
|
import moment from 'moment-mini';
|
|
12
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
13
|
+
import { useColors } from '../../constants/useColors';
|
|
14
|
+
const co_profile_sections = ['gap', 'info', 'members', 'podcasts', 'engage_toggle', 'competitions', 'feeds'];
|
|
14
15
|
const CompanyProfile = ({
|
|
15
16
|
company_id,
|
|
16
17
|
padding_insets,
|
|
@@ -24,6 +25,7 @@ const CompanyProfile = ({
|
|
|
24
25
|
onBack,
|
|
25
26
|
onShareCompany
|
|
26
27
|
}) => {
|
|
28
|
+
const Colors = useColors();
|
|
27
29
|
const [module_size, setModuleSize] = useState({
|
|
28
30
|
height: 700,
|
|
29
31
|
width: 300
|
|
@@ -39,7 +41,7 @@ const CompanyProfile = ({
|
|
|
39
41
|
company_loading: false,
|
|
40
42
|
company_members: [],
|
|
41
43
|
players: [],
|
|
42
|
-
active_toggle: '
|
|
44
|
+
active_toggle: 'competitions'
|
|
43
45
|
});
|
|
44
46
|
const {
|
|
45
47
|
company_loading,
|
|
@@ -93,10 +95,10 @@ const CompanyProfile = ({
|
|
|
93
95
|
}, [company_id]);
|
|
94
96
|
useEffect(() => {
|
|
95
97
|
switch (active_toggle) {
|
|
96
|
-
case '
|
|
98
|
+
case 'competitions':
|
|
97
99
|
getCompsFromServer(company_id, 0);
|
|
98
100
|
return;
|
|
99
|
-
case '
|
|
101
|
+
case 'feeds':
|
|
100
102
|
getFeedFromServer(company_id, 0);
|
|
101
103
|
return;
|
|
102
104
|
default:
|
|
@@ -194,14 +196,15 @@ const CompanyProfile = ({
|
|
|
194
196
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
195
197
|
}
|
|
196
198
|
return /*#__PURE__*/React.createElement(View, {
|
|
199
|
+
float: true,
|
|
197
200
|
style: {
|
|
198
|
-
|
|
201
|
+
margin: 4
|
|
199
202
|
}
|
|
200
203
|
}, /*#__PURE__*/React.createElement(PlayerCard, {
|
|
201
204
|
player: player,
|
|
202
|
-
width:
|
|
203
|
-
border: true,
|
|
205
|
+
width: 150,
|
|
204
206
|
alignment: "vertical",
|
|
207
|
+
show_follow: true,
|
|
205
208
|
onSelectPlayer: onSelectPlayer,
|
|
206
209
|
onFollowingUpdate: pf => console.log(pf)
|
|
207
210
|
}));
|
|
@@ -213,9 +216,9 @@ const CompanyProfile = ({
|
|
|
213
216
|
article_width = 240;
|
|
214
217
|
}
|
|
215
218
|
return /*#__PURE__*/React.createElement(View, {
|
|
219
|
+
float: true,
|
|
216
220
|
style: {
|
|
217
|
-
|
|
218
|
-
margin: 5
|
|
221
|
+
margin: 4
|
|
219
222
|
}
|
|
220
223
|
}, /*#__PURE__*/React.createElement(ArticleCard, {
|
|
221
224
|
article_feed: article_feed,
|
|
@@ -231,33 +234,16 @@ const CompanyProfile = ({
|
|
|
231
234
|
pod_width = 200;
|
|
232
235
|
}
|
|
233
236
|
return /*#__PURE__*/React.createElement(View, {
|
|
234
|
-
|
|
237
|
+
float: true,
|
|
238
|
+
style: {
|
|
239
|
+
margin: 4
|
|
240
|
+
}
|
|
235
241
|
}, /*#__PURE__*/React.createElement(PodcastCard, {
|
|
236
242
|
podcast: data.item,
|
|
237
243
|
width: pod_width,
|
|
238
244
|
onSelectPodcast: onSelectPodcast
|
|
239
245
|
}));
|
|
240
246
|
};
|
|
241
|
-
const renderToggles = data => {
|
|
242
|
-
const active = data.item == active_toggle ? true : false;
|
|
243
|
-
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
244
|
-
style: {
|
|
245
|
-
width: (module_size.width - 65) / 2,
|
|
246
|
-
padding: 15,
|
|
247
|
-
borderRadius: 22,
|
|
248
|
-
backgroundColor: active ? Colors.brand.midnight : 'transparent'
|
|
249
|
-
},
|
|
250
|
-
onPress: () => setCompanyData({
|
|
251
|
-
...company_data,
|
|
252
|
-
active_toggle: data.item
|
|
253
|
-
})
|
|
254
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
255
|
-
textAlign: "center",
|
|
256
|
-
weight: "bold",
|
|
257
|
-
size: 14,
|
|
258
|
-
color: active ? Colors.shades.white : Colors.brand.midnight
|
|
259
|
-
}, data.item));
|
|
260
|
-
};
|
|
261
247
|
const renderComps = data => {
|
|
262
248
|
switch (data.item.type) {
|
|
263
249
|
case 'competition':
|
|
@@ -273,13 +259,18 @@ const CompanyProfile = ({
|
|
|
273
259
|
if (!competition_result_type) {
|
|
274
260
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
275
261
|
}
|
|
276
|
-
return /*#__PURE__*/React.createElement(
|
|
262
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
263
|
+
float: true,
|
|
264
|
+
style: {
|
|
265
|
+
margin: 5
|
|
266
|
+
}
|
|
267
|
+
}, /*#__PURE__*/React.createElement(CompetitionCard, {
|
|
277
268
|
competition: competition,
|
|
278
269
|
company: company,
|
|
279
270
|
competition_type: competition_type,
|
|
280
271
|
competition_result_type: competition_result_type,
|
|
281
272
|
onCompetitionSelect: onSelectCompetition
|
|
282
|
-
});
|
|
273
|
+
}));
|
|
283
274
|
case 'bracket_competition':
|
|
284
275
|
const bracket_competition = bracket_competitions.find(bc => bc.bracket_competition_id == data.item.id);
|
|
285
276
|
if (!bracket_competition) {
|
|
@@ -291,52 +282,284 @@ const CompanyProfile = ({
|
|
|
291
282
|
}
|
|
292
283
|
const bracket = brackets.find(b => b.bracket_id == bracket_competition.bracket_id);
|
|
293
284
|
const league = leagues.find(l => l.league_id == bracket?.league_id);
|
|
294
|
-
return /*#__PURE__*/React.createElement(
|
|
285
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
286
|
+
float: true,
|
|
287
|
+
style: {
|
|
288
|
+
margin: 5
|
|
289
|
+
}
|
|
290
|
+
}, /*#__PURE__*/React.createElement(BracketCompetitionCard, {
|
|
295
291
|
bracket_competition: bracket_competition,
|
|
296
292
|
competition_result_type: crt,
|
|
297
293
|
company: company,
|
|
298
294
|
bracket: bracket,
|
|
299
295
|
league: league,
|
|
300
296
|
onCompetitionSelect: onSelectBracketCompetition
|
|
301
|
-
});
|
|
297
|
+
}));
|
|
302
298
|
case 'squares_competition':
|
|
303
299
|
const squares_competition = squares_competitions.find(sc => sc.sq_comp_id == data.item.id);
|
|
304
300
|
if (!squares_competition) {
|
|
305
301
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
306
302
|
}
|
|
307
303
|
const event = events.find(e => e.event_id == squares_competition.event_id);
|
|
308
|
-
return /*#__PURE__*/React.createElement(
|
|
304
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
305
|
+
float: true,
|
|
306
|
+
style: {
|
|
307
|
+
margin: 5
|
|
308
|
+
}
|
|
309
|
+
}, /*#__PURE__*/React.createElement(SquaresCompetitionCard, {
|
|
309
310
|
squares_competition: squares_competition,
|
|
310
311
|
onSelectCompetition: onSelectSquaresCompetition,
|
|
311
312
|
company: company,
|
|
312
313
|
event: event
|
|
314
|
+
}));
|
|
315
|
+
default:
|
|
316
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
const renderSections = data => {
|
|
320
|
+
switch (data.item) {
|
|
321
|
+
case 'gap':
|
|
322
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
323
|
+
transparent: true,
|
|
324
|
+
style: {
|
|
325
|
+
height: 300
|
|
326
|
+
}
|
|
313
327
|
});
|
|
328
|
+
case 'info':
|
|
329
|
+
if (!company) {
|
|
330
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
331
|
+
}
|
|
332
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
333
|
+
style: {
|
|
334
|
+
borderTopRightRadius: 22,
|
|
335
|
+
borderTopLeftRadius: 22
|
|
336
|
+
}
|
|
337
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
338
|
+
type: "header",
|
|
339
|
+
style: {
|
|
340
|
+
flexDirection: 'row',
|
|
341
|
+
alignItems: 'center',
|
|
342
|
+
padding: 20,
|
|
343
|
+
borderTopRightRadius: 22,
|
|
344
|
+
borderTopLeftRadius: 22
|
|
345
|
+
}
|
|
346
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
347
|
+
transparent: true,
|
|
348
|
+
style: {
|
|
349
|
+
flex: 1
|
|
350
|
+
}
|
|
351
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
352
|
+
theme: "h1"
|
|
353
|
+
}, company.company_name), /*#__PURE__*/React.createElement(Text, {
|
|
354
|
+
style: {
|
|
355
|
+
marginTop: 4
|
|
356
|
+
},
|
|
357
|
+
theme: "description"
|
|
358
|
+
}, company.company_description)), /*#__PURE__*/React.createElement(Button, {
|
|
359
|
+
disabled: true,
|
|
360
|
+
style: {
|
|
361
|
+
backgroundColor: Colors.absolutes.highlights.highlight500
|
|
362
|
+
}
|
|
363
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
364
|
+
size: 10,
|
|
365
|
+
theme: "h1",
|
|
366
|
+
color: Colors.text.white,
|
|
367
|
+
textAlign: "center"
|
|
368
|
+
}, company.type.toUpperCase()))));
|
|
369
|
+
case 'members':
|
|
370
|
+
if (!company) {
|
|
371
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
372
|
+
}
|
|
373
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
374
|
+
type: "header",
|
|
375
|
+
style: {
|
|
376
|
+
flexDirection: 'row',
|
|
377
|
+
alignItems: 'center',
|
|
378
|
+
padding: 20
|
|
379
|
+
}
|
|
380
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
381
|
+
transparent: true
|
|
382
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
383
|
+
theme: "h1"
|
|
384
|
+
}, "Members"), /*#__PURE__*/React.createElement(Text, {
|
|
385
|
+
style: {
|
|
386
|
+
marginTop: 3
|
|
387
|
+
},
|
|
388
|
+
theme: "description"
|
|
389
|
+
}, "The following are members of ", company.company_name)), /*#__PURE__*/React.createElement(View, {
|
|
390
|
+
transparent: true,
|
|
391
|
+
style: {
|
|
392
|
+
padding: 10,
|
|
393
|
+
flex: 1,
|
|
394
|
+
alignItems: 'flex-end'
|
|
395
|
+
}
|
|
396
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
397
|
+
theme: "h1"
|
|
398
|
+
}, company_members.length))), /*#__PURE__*/React.createElement(View, {
|
|
399
|
+
type: "body",
|
|
400
|
+
style: {
|
|
401
|
+
padding: 10
|
|
402
|
+
}
|
|
403
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
404
|
+
type: "row"
|
|
405
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
406
|
+
style: {
|
|
407
|
+
flex: 1
|
|
408
|
+
}
|
|
409
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
410
|
+
key: "company_members",
|
|
411
|
+
horizontal: true,
|
|
412
|
+
showsHorizontalScrollIndicator: false,
|
|
413
|
+
data: company_members,
|
|
414
|
+
renderItem: renderMembers,
|
|
415
|
+
keyExtractor: item => item.player_id.toString()
|
|
416
|
+
})))));
|
|
417
|
+
case 'podcasts':
|
|
418
|
+
if (!company) {
|
|
419
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
420
|
+
}
|
|
421
|
+
if (podcasts.length == 0) {
|
|
422
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
423
|
+
}
|
|
424
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
425
|
+
type: "header",
|
|
426
|
+
style: {
|
|
427
|
+
flexDirection: 'row',
|
|
428
|
+
alignItems: 'center',
|
|
429
|
+
padding: 20
|
|
430
|
+
}
|
|
431
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
432
|
+
transparent: true,
|
|
433
|
+
style: {
|
|
434
|
+
flex: 1
|
|
435
|
+
}
|
|
436
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
437
|
+
theme: "h1"
|
|
438
|
+
}, "Podcasts"), /*#__PURE__*/React.createElement(Text, {
|
|
439
|
+
style: {
|
|
440
|
+
marginTop: 3
|
|
441
|
+
},
|
|
442
|
+
theme: "description"
|
|
443
|
+
}, "The following are podcasts hosted by ", company.company_name)), /*#__PURE__*/React.createElement(View, {
|
|
444
|
+
transparent: true,
|
|
445
|
+
style: {
|
|
446
|
+
padding: 10
|
|
447
|
+
}
|
|
448
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
449
|
+
theme: "h2"
|
|
450
|
+
}, podcasts.length))), /*#__PURE__*/React.createElement(View, {
|
|
451
|
+
type: "body",
|
|
452
|
+
style: {
|
|
453
|
+
padding: 10
|
|
454
|
+
}
|
|
455
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
456
|
+
type: "row"
|
|
457
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
458
|
+
style: {
|
|
459
|
+
flex: 1
|
|
460
|
+
}
|
|
461
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
462
|
+
key: "company_pods",
|
|
463
|
+
horizontal: true,
|
|
464
|
+
showsHorizontalScrollIndicator: false,
|
|
465
|
+
data: podcasts,
|
|
466
|
+
renderItem: renderPodcasts,
|
|
467
|
+
keyExtractor: item => item.podcast_id.toString()
|
|
468
|
+
})))));
|
|
469
|
+
case 'engage_toggle':
|
|
470
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
471
|
+
type: "header",
|
|
472
|
+
style: {
|
|
473
|
+
flexDirection: 'row',
|
|
474
|
+
alignItems: 'center',
|
|
475
|
+
padding: 10
|
|
476
|
+
}
|
|
477
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
478
|
+
transparent: true,
|
|
479
|
+
style: {
|
|
480
|
+
flex: 1,
|
|
481
|
+
paddingLeft: 10
|
|
482
|
+
}
|
|
483
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
484
|
+
theme: "h1"
|
|
485
|
+
}, "Engage with ", company?.company_name), /*#__PURE__*/React.createElement(Text, {
|
|
486
|
+
style: {
|
|
487
|
+
marginTop: 3
|
|
488
|
+
},
|
|
489
|
+
theme: "description"
|
|
490
|
+
}, "Use the toggle to find ways to engage"))), /*#__PURE__*/React.createElement(View, {
|
|
491
|
+
style: {
|
|
492
|
+
padding: 10
|
|
493
|
+
}
|
|
494
|
+
}, /*#__PURE__*/React.createElement(Toggle, {
|
|
495
|
+
options: [{
|
|
496
|
+
key: 'competitions',
|
|
497
|
+
label: 'Comps'
|
|
498
|
+
}, {
|
|
499
|
+
key: 'feeds',
|
|
500
|
+
label: 'Feeds'
|
|
501
|
+
}],
|
|
502
|
+
selected_option: active_toggle,
|
|
503
|
+
onSelectOption: option => setCompanyData({
|
|
504
|
+
...company_data,
|
|
505
|
+
active_toggle: option
|
|
506
|
+
})
|
|
507
|
+
})));
|
|
508
|
+
case 'competitions':
|
|
509
|
+
if (active_toggle != 'competitions') {
|
|
510
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
511
|
+
}
|
|
512
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
513
|
+
style: {
|
|
514
|
+
padding: 10
|
|
515
|
+
}
|
|
516
|
+
}, competition_loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
517
|
+
size: "large",
|
|
518
|
+
color: Colors.text.h1,
|
|
519
|
+
style: {
|
|
520
|
+
padding: 20,
|
|
521
|
+
alignSelf: 'center'
|
|
522
|
+
}
|
|
523
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(FlatList, {
|
|
524
|
+
key: 'comps_list',
|
|
525
|
+
data: sorted_comps.sort((a, b) => a.start_time.unix() - b.start_time.unix()),
|
|
526
|
+
renderItem: renderComps,
|
|
527
|
+
keyExtractor: item => `${item.id}:${item.type}`
|
|
528
|
+
}));
|
|
529
|
+
case 'feeds':
|
|
530
|
+
if (active_toggle != 'feeds') {
|
|
531
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
532
|
+
}
|
|
533
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
534
|
+
style: {
|
|
535
|
+
padding: 10
|
|
536
|
+
}
|
|
537
|
+
}, feed_loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
538
|
+
size: "large",
|
|
539
|
+
color: Colors.text.h1,
|
|
540
|
+
style: {
|
|
541
|
+
padding: 20,
|
|
542
|
+
alignSelf: 'center'
|
|
543
|
+
}
|
|
544
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
|
|
545
|
+
style: {
|
|
546
|
+
flexDirection: 'row',
|
|
547
|
+
flexWrap: 'wrap',
|
|
548
|
+
justifyContent: 'center'
|
|
549
|
+
}
|
|
550
|
+
}, articles.sort((a, b) => moment(b.create_datetime).unix() - moment(a.create_datetime).unix()).map((a, i) => {
|
|
551
|
+
return renderArticles({
|
|
552
|
+
item: a,
|
|
553
|
+
index: i
|
|
554
|
+
});
|
|
555
|
+
})));
|
|
314
556
|
default:
|
|
315
557
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
316
558
|
}
|
|
317
559
|
};
|
|
318
|
-
if (company_loading || !company) {
|
|
319
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
320
|
-
style: {
|
|
321
|
-
flex: 1
|
|
322
|
-
}
|
|
323
|
-
}, /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
324
|
-
style: {
|
|
325
|
-
padding: 20,
|
|
326
|
-
alignSelf: 'center'
|
|
327
|
-
},
|
|
328
|
-
size: "large",
|
|
329
|
-
color: Colors.brand.midnight
|
|
330
|
-
}));
|
|
331
|
-
}
|
|
332
560
|
return /*#__PURE__*/React.createElement(View, {
|
|
333
561
|
style: {
|
|
334
562
|
flex: 1
|
|
335
|
-
}
|
|
336
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
337
|
-
style: {
|
|
338
|
-
flex: 1,
|
|
339
|
-
backgroundColor: Colors.shades.black_faded
|
|
340
563
|
},
|
|
341
564
|
onLayout: ev => {
|
|
342
565
|
const {
|
|
@@ -359,218 +582,29 @@ const CompanyProfile = ({
|
|
|
359
582
|
nativeID: "profile_image"
|
|
360
583
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
361
584
|
source: {
|
|
362
|
-
uri: company
|
|
585
|
+
uri: company?.company_image?.url
|
|
363
586
|
},
|
|
364
587
|
style: {
|
|
365
588
|
width: module_size.width,
|
|
366
589
|
height: module_size.width,
|
|
367
590
|
borderBottomRightRadius: 50,
|
|
368
|
-
borderBottomLeftRadius: 50
|
|
591
|
+
borderBottomLeftRadius: 50,
|
|
592
|
+
backgroundColor: Colors.text.white
|
|
369
593
|
},
|
|
370
594
|
resizeMode: "cover"
|
|
371
|
-
})), /*#__PURE__*/React.createElement(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
381
|
-
style: {
|
|
382
|
-
...view_styles.section_header
|
|
383
|
-
}
|
|
384
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
385
|
-
style: {
|
|
386
|
-
flex: 1,
|
|
387
|
-
marginRight: 10
|
|
388
|
-
}
|
|
389
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
390
|
-
theme: "header"
|
|
391
|
-
}, company.company_name), /*#__PURE__*/React.createElement(Text, {
|
|
392
|
-
style: {
|
|
393
|
-
marginTop: 4
|
|
394
|
-
},
|
|
395
|
-
theme: "body_2"
|
|
396
|
-
}, company.company_description)), /*#__PURE__*/React.createElement(View, {
|
|
397
|
-
style: {
|
|
398
|
-
backgroundColor: Colors.highlights.highlight500,
|
|
399
|
-
padding: 10,
|
|
400
|
-
borderRadius: 22
|
|
401
|
-
}
|
|
402
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
403
|
-
size: 10,
|
|
404
|
-
weight: "bold",
|
|
405
|
-
color: Colors.shades.white,
|
|
406
|
-
textAlign: "center"
|
|
407
|
-
}, company.type.toUpperCase())))), /*#__PURE__*/React.createElement(View, {
|
|
408
|
-
style: {
|
|
409
|
-
...view_styles.section
|
|
410
|
-
}
|
|
411
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
412
|
-
style: {
|
|
413
|
-
...view_styles.section_header
|
|
414
|
-
}
|
|
415
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
416
|
-
style: {
|
|
417
|
-
flex: 1
|
|
418
|
-
}
|
|
419
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
420
|
-
theme: "header"
|
|
421
|
-
}, "Company Members"), /*#__PURE__*/React.createElement(Text, {
|
|
422
|
-
style: {
|
|
423
|
-
marginTop: 3
|
|
424
|
-
},
|
|
425
|
-
theme: "body_2"
|
|
426
|
-
}, "The following are members of ", company.company_name)), /*#__PURE__*/React.createElement(View, {
|
|
427
|
-
style: {
|
|
428
|
-
padding: 10
|
|
429
|
-
}
|
|
430
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
431
|
-
theme: "header_2"
|
|
432
|
-
}, company_members.length))), /*#__PURE__*/React.createElement(View, {
|
|
433
|
-
style: {
|
|
434
|
-
...view_styles.section_body,
|
|
435
|
-
padding: 10
|
|
436
|
-
}
|
|
437
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
438
|
-
style: {
|
|
439
|
-
...view_styles.body_row
|
|
440
|
-
}
|
|
441
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
442
|
-
style: {
|
|
443
|
-
flex: 1
|
|
444
|
-
}
|
|
445
|
-
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
446
|
-
key: "company_members",
|
|
447
|
-
horizontal: true,
|
|
448
|
-
showsHorizontalScrollIndicator: false,
|
|
449
|
-
data: company_members,
|
|
450
|
-
renderItem: renderMembers,
|
|
451
|
-
keyExtractor: item => item.player_id.toString()
|
|
452
|
-
}))))), podcasts.length > 0 ? /*#__PURE__*/React.createElement(View, {
|
|
453
|
-
style: {
|
|
454
|
-
...view_styles.section
|
|
455
|
-
}
|
|
456
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
457
|
-
style: {
|
|
458
|
-
...view_styles.section_header
|
|
459
|
-
}
|
|
460
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
461
|
-
style: {
|
|
462
|
-
flex: 1
|
|
463
|
-
}
|
|
464
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
465
|
-
theme: "header"
|
|
466
|
-
}, "Podcasts"), /*#__PURE__*/React.createElement(Text, {
|
|
467
|
-
style: {
|
|
468
|
-
marginTop: 3
|
|
469
|
-
},
|
|
470
|
-
theme: "body_2"
|
|
471
|
-
}, "The following are podcasts hosted by ", company.company_name)), /*#__PURE__*/React.createElement(View, {
|
|
472
|
-
style: {
|
|
473
|
-
padding: 10
|
|
474
|
-
}
|
|
475
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
476
|
-
theme: "header_2"
|
|
477
|
-
}, podcasts.length))), /*#__PURE__*/React.createElement(View, {
|
|
478
|
-
style: {
|
|
479
|
-
...view_styles.section_body,
|
|
480
|
-
padding: 0
|
|
481
|
-
}
|
|
482
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
483
|
-
style: {
|
|
484
|
-
...view_styles.body_row
|
|
485
|
-
}
|
|
486
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
487
|
-
style: {
|
|
488
|
-
flex: 1
|
|
489
|
-
}
|
|
490
|
-
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
491
|
-
key: "company_pods",
|
|
492
|
-
horizontal: true,
|
|
493
|
-
showsHorizontalScrollIndicator: false,
|
|
494
|
-
data: podcasts,
|
|
495
|
-
renderItem: renderPodcasts,
|
|
496
|
-
keyExtractor: item => item.podcast_id.toString()
|
|
497
|
-
}))))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
|
|
498
|
-
style: {
|
|
499
|
-
...view_styles.section
|
|
500
|
-
}
|
|
501
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
502
|
-
style: {
|
|
503
|
-
...view_styles.section_header
|
|
504
|
-
}
|
|
505
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
506
|
-
style: {
|
|
507
|
-
flex: 1
|
|
508
|
-
}
|
|
509
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
510
|
-
theme: "header"
|
|
511
|
-
}, "Engage"), /*#__PURE__*/React.createElement(Text, {
|
|
512
|
-
style: {
|
|
513
|
-
marginTop: 3
|
|
514
|
-
},
|
|
515
|
-
theme: "body_2"
|
|
516
|
-
}, "Use the toggles below to see recent activity from ", company.company_name))), /*#__PURE__*/React.createElement(View, {
|
|
517
|
-
style: {
|
|
518
|
-
...view_styles.section_body,
|
|
519
|
-
padding: 0
|
|
520
|
-
}
|
|
521
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
522
|
-
style: {
|
|
523
|
-
...view_styles.body_row,
|
|
524
|
-
margin: 10,
|
|
525
|
-
marginLeft: 20,
|
|
526
|
-
marginRight: 20,
|
|
527
|
-
borderRadius: 22,
|
|
528
|
-
padding: 1,
|
|
529
|
-
backgroundColor: Colors.shades.shade100
|
|
530
|
-
}
|
|
531
|
-
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
532
|
-
key: 'toggles',
|
|
533
|
-
horizontal: true,
|
|
534
|
-
showsHorizontalScrollIndicator: false,
|
|
535
|
-
data: ['Comps', 'Feeds'],
|
|
536
|
-
renderItem: renderToggles,
|
|
537
|
-
keyExtractor: item => item
|
|
538
|
-
})), active_toggle == 'Comps' ? /*#__PURE__*/React.createElement(View, null, competition_loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
539
|
-
size: "large",
|
|
540
|
-
color: Colors.brand.midnight,
|
|
541
|
-
style: {
|
|
542
|
-
padding: 20,
|
|
543
|
-
alignSelf: 'center'
|
|
544
|
-
}
|
|
545
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(FlatList, {
|
|
546
|
-
key: 'comps_list',
|
|
547
|
-
data: sorted_comps.sort((a, b) => a.start_time.unix() - b.start_time.unix()),
|
|
548
|
-
renderItem: renderComps,
|
|
549
|
-
keyExtractor: item => `${item.id}:${item.type}`
|
|
550
|
-
})) : active_toggle == 'Feeds' ? /*#__PURE__*/React.createElement(View, null, feed_loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
551
|
-
size: "large",
|
|
552
|
-
color: Colors.brand.midnight,
|
|
553
|
-
style: {
|
|
554
|
-
padding: 20,
|
|
555
|
-
alignSelf: 'center'
|
|
556
|
-
}
|
|
557
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
|
|
558
|
-
style: {
|
|
559
|
-
flexDirection: 'row',
|
|
560
|
-
flexWrap: 'wrap'
|
|
561
|
-
}
|
|
562
|
-
}, articles.sort((a, b) => moment(b.create_datetime).unix() - moment(a.create_datetime).unix()).map((a, i) => {
|
|
563
|
-
return renderArticles({
|
|
564
|
-
item: a,
|
|
565
|
-
index: i
|
|
566
|
-
});
|
|
567
|
-
}))) : /*#__PURE__*/React.createElement(React.Fragment, null)))), onBack ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
595
|
+
})), /*#__PURE__*/React.createElement(FlatList, {
|
|
596
|
+
data: co_profile_sections,
|
|
597
|
+
key: "co_profile_sections_list",
|
|
598
|
+
keyExtractor: item => item,
|
|
599
|
+
onRefresh: () => getCompanyDataFromServer(company_id),
|
|
600
|
+
refreshing: company_loading,
|
|
601
|
+
renderItem: renderSections
|
|
602
|
+
}), onBack ? /*#__PURE__*/React.createElement(Button, {
|
|
603
|
+
float: true,
|
|
568
604
|
style: {
|
|
569
605
|
position: 'absolute',
|
|
570
606
|
top: padding_insets?.top ?? 0,
|
|
571
607
|
left: 0,
|
|
572
|
-
...view_styles.section,
|
|
573
|
-
backgroundColor: Colors.shades.shade100,
|
|
574
608
|
height: 50,
|
|
575
609
|
width: 50,
|
|
576
610
|
borderRadius: 100,
|
|
@@ -580,15 +614,14 @@ const CompanyProfile = ({
|
|
|
580
614
|
onPress: () => onBack()
|
|
581
615
|
}, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
582
616
|
direction: "left",
|
|
583
|
-
color: Colors.
|
|
617
|
+
color: Colors.text.h1,
|
|
584
618
|
size: 14
|
|
585
|
-
})) : /*#__PURE__*/React.createElement(React.Fragment, null), onShareCompany ? /*#__PURE__*/React.createElement(
|
|
619
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null), company && onShareCompany ? /*#__PURE__*/React.createElement(Button, {
|
|
620
|
+
float: true,
|
|
586
621
|
style: {
|
|
587
622
|
position: 'absolute',
|
|
588
623
|
top: padding_insets?.top ?? 0,
|
|
589
624
|
right: 0,
|
|
590
|
-
...view_styles.section,
|
|
591
|
-
backgroundColor: Colors.shades.shade100,
|
|
592
625
|
height: 50,
|
|
593
626
|
width: 50,
|
|
594
627
|
borderRadius: 100,
|
|
@@ -597,9 +630,9 @@ const CompanyProfile = ({
|
|
|
597
630
|
},
|
|
598
631
|
onPress: () => onShareCompany(company)
|
|
599
632
|
}, /*#__PURE__*/React.createElement(Icons.ShareIcon, {
|
|
600
|
-
color: Colors.
|
|
633
|
+
color: Colors.text.h1,
|
|
601
634
|
size: 14
|
|
602
|
-
})) : /*#__PURE__*/React.createElement(React.Fragment, null))
|
|
635
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
603
636
|
};
|
|
604
637
|
export default CompanyProfile;
|
|
605
638
|
//# sourceMappingURL=index.js.map
|