be-components 4.1.9 → 4.2.1
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/MarketComponents/components/AthleteMarket/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/EventMarket/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +8 -7
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamTournamentMarket/index.js +1 -1
- package/lib/commonjs/Poll/components/CampaignHeader.js +20 -15
- package/lib/commonjs/Poll/components/CampaignHeader.js.map +1 -1
- package/lib/commonjs/Poll/components/CampaignLeaderboard.js +77 -75
- package/lib/commonjs/Poll/components/CampaignLeaderboard.js.map +1 -1
- package/lib/commonjs/Poll/components/CampaignProgressBar.js +21 -20
- package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -1
- package/lib/commonjs/Poll/components/CampaignResult.js +21 -19
- package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -1
- package/lib/commonjs/Poll/components/PollCard.js +240 -218
- package/lib/commonjs/Poll/components/PollCard.js.map +1 -1
- package/lib/commonjs/Poll/components/PollOptionCard.js +28 -25
- package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -1
- package/lib/commonjs/Poll/components/PollQuestionsSection.js +25 -19
- package/lib/commonjs/Poll/components/PollQuestionsSection.js.map +1 -1
- package/lib/commonjs/Poll/components/PollSelectCard.js +48 -45
- package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -1
- package/lib/commonjs/Poll/index.js +97 -93
- package/lib/commonjs/Poll/index.js.map +1 -1
- package/lib/module/MarketComponents/components/AthleteMarket/index.js +1 -1
- package/lib/module/MarketComponents/components/AthleteMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js +1 -1
- package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/EventMarket/index.js +1 -1
- package/lib/module/MarketComponents/components/EventMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/MatchMarket/index.js +1 -1
- package/lib/module/MarketComponents/components/MatchMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +8 -7
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamTournamentMarket/index.js +1 -1
- package/lib/module/MarketComponents/components/TeamTournamentMarket/index.js.map +1 -1
- package/lib/module/Poll/components/CampaignHeader.js +19 -14
- package/lib/module/Poll/components/CampaignHeader.js.map +1 -1
- package/lib/module/Poll/components/CampaignLeaderboard.js +59 -57
- package/lib/module/Poll/components/CampaignLeaderboard.js.map +1 -1
- package/lib/module/Poll/components/CampaignProgressBar.js +17 -15
- package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -1
- package/lib/module/Poll/components/CampaignResult.js +17 -15
- package/lib/module/Poll/components/CampaignResult.js.map +1 -1
- package/lib/module/Poll/components/PollCard.js +238 -216
- package/lib/module/Poll/components/PollCard.js.map +1 -1
- package/lib/module/Poll/components/PollOptionCard.js +24 -20
- package/lib/module/Poll/components/PollOptionCard.js.map +1 -1
- package/lib/module/Poll/components/PollQuestionsSection.js +21 -15
- package/lib/module/Poll/components/PollQuestionsSection.js.map +1 -1
- package/lib/module/Poll/components/PollSelectCard.js +33 -30
- package/lib/module/Poll/components/PollSelectCard.js.map +1 -1
- package/lib/module/Poll/index.js +97 -92
- package/lib/module/Poll/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignHeader.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignLeaderboard.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Poll/components/CampaignLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignProgressBar.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignResult.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/PollCard.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Poll/components/PollCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/PollOptionCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/PollQuestionsSection.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/PollSelectCard.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Poll/components/PollSelectCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/index.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Poll/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Spring.d.ts +1 -1
- package/lib/typescript/lib/module/Poll/components/CampaignHeader.d.ts +1 -2
- package/lib/typescript/lib/module/Poll/components/CampaignHeader.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/CampaignLeaderboard.d.ts +2 -4
- package/lib/typescript/lib/module/Poll/components/CampaignLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/CampaignProgressBar.d.ts +1 -2
- package/lib/typescript/lib/module/Poll/components/CampaignProgressBar.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/CampaignResult.d.ts +1 -2
- package/lib/typescript/lib/module/Poll/components/CampaignResult.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/PollCard.d.ts +3 -5
- package/lib/typescript/lib/module/Poll/components/PollCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/PollOptionCard.d.ts +1 -2
- package/lib/typescript/lib/module/Poll/components/PollOptionCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/PollQuestionsSection.d.ts +1 -2
- package/lib/typescript/lib/module/Poll/components/PollQuestionsSection.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/PollSelectCard.d.ts +2 -4
- package/lib/typescript/lib/module/Poll/components/PollSelectCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/index.d.ts +2 -4
- package/lib/typescript/lib/module/Poll/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/CampaignHeader.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/CampaignLeaderboard.d.ts +1 -2
- package/lib/typescript/src/Poll/components/CampaignLeaderboard.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/PollCard.d.ts +3 -2
- package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/PollQuestionsSection.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +1 -1
- package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -1
- package/lib/typescript/src/Poll/index.d.ts +1 -2
- package/lib/typescript/src/Poll/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/MarketComponents/components/AthleteMarket/index.tsx +1 -1
- package/src/MarketComponents/components/AthleteTournamentMarket/index.tsx +1 -1
- package/src/MarketComponents/components/EventMarket/index.tsx +1 -1
- package/src/MarketComponents/components/MatchMarket/index.tsx +1 -1
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +5 -4
- package/src/MarketComponents/components/TeamTournamentMarket/index.tsx +1 -1
- package/src/Poll/components/CampaignHeader.tsx +13 -12
- package/src/Poll/components/CampaignLeaderboard.tsx +41 -52
- package/src/Poll/components/CampaignProgressBar.tsx +17 -15
- package/src/Poll/components/CampaignResult.tsx +13 -13
- package/src/Poll/components/PollCard.tsx +129 -118
- package/src/Poll/components/PollOptionCard.tsx +20 -21
- package/src/Poll/components/PollQuestionsSection.tsx +15 -14
- package/src/Poll/components/PollSelectCard.tsx +47 -48
- package/src/Poll/index.tsx +83 -73
- package/lib/commonjs/Poll/components/CampaignPlay.js +0 -472
- package/lib/commonjs/Poll/components/CampaignPlay.js.map +0 -1
- package/lib/module/Poll/components/CampaignPlay.js +0 -463
- package/lib/module/Poll/components/CampaignPlay.js.map +0 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignPlay.d.ts +0 -12
- package/lib/typescript/lib/commonjs/Poll/components/CampaignPlay.d.ts.map +0 -1
- package/lib/typescript/lib/module/Poll/components/CampaignPlay.d.ts +0 -13
- package/lib/typescript/lib/module/Poll/components/CampaignPlay.d.ts.map +0 -1
- package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +0 -14
- package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +0 -1
- package/src/Poll/components/CampaignPlay.tsx +0 -335
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignLeaderboard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignLeaderboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAA2B,iBAAiB,EAAqB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"CampaignLeaderboard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignLeaderboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAA2B,iBAAiB,EAAqB,MAAM,aAAa,CAAC;AAOjG,KAAK,wBAAwB,GAAG;IAC5B,aAAa,EAAC,iBAAiB,CAAC;IAChC,SAAS,EAAE,OAAO,GAAC,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,CAAC,EAAC,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,mBAAmB,iEAAiE,wBAAwB,sBAqJjH,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignProgressBar.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignProgressBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"CampaignProgressBar.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignProgressBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKnF,KAAK,wBAAwB,GAAG;IAC5B,aAAa,EAAC,iBAAiB,CAAC;IAChC,KAAK,EAAC,SAAS,EAAE,CAAC;IAClB,cAAc,EAAC,iBAAiB,EAAE,CAAC;IACnC,WAAW,EAAC,MAAM,CAAC;IACnB,YAAY,EAAC,CAAC,IAAI,EAAC,SAAS,KAAK,IAAI,CAAA;CACxC,CAAA;AAED,QAAA,MAAM,mBAAmB,yDAAwD,wBAAwB,sBAmDxG,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignResult.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignResult.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CampaignResult.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignResult.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAMpD,KAAK,mBAAmB,GAAG;IACvB,aAAa,EAAC,iBAAiB,CAAC;IAChC,qBAAqB,CAAC,EAAC,MAAM,IAAI,CAAA;CACpC,CAAA;AAED,QAAA,MAAM,cAAc,6CAA+C,mBAAmB,sBAyBrF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PollResponseProps } from '../../types';
|
|
3
3
|
type PollCardProps = {
|
|
4
|
-
poll_id
|
|
4
|
+
poll_id?: string;
|
|
5
5
|
poll_response?: PollResponseProps;
|
|
6
6
|
action_loading?: boolean;
|
|
7
|
+
width: number;
|
|
7
8
|
question_number?: number;
|
|
8
9
|
view?: string;
|
|
9
10
|
total_questions?: number;
|
|
@@ -12,6 +13,6 @@ type PollCardProps = {
|
|
|
12
13
|
onCancel: () => void;
|
|
13
14
|
onSkip: () => void;
|
|
14
15
|
};
|
|
15
|
-
declare const PollCard: ({ poll_id, poll_response, action_loading, onSkip, onCancel, onResponse }: PollCardProps) => React.JSX.Element;
|
|
16
|
+
declare const PollCard: ({ poll_id, width, poll_response, action_loading, onSkip, onCancel, onResponse }: PollCardProps) => React.JSX.Element;
|
|
16
17
|
export default PollCard;
|
|
17
18
|
//# sourceMappingURL=PollCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PollCard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAA8B,iBAAiB,EAAoB,MAAM,aAAa,CAAC;AAMnG,KAAK,aAAa,GAAG;IACjB,OAAO,EAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PollCard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAA8B,iBAAiB,EAAoB,MAAM,aAAa,CAAC;AAMnG,KAAK,aAAa,GAAG;IACjB,OAAO,CAAC,EAAC,MAAM,CAAC;IAChB,aAAa,CAAC,EAAC,iBAAiB,CAAC;IACjC,cAAc,CAAC,EAAC,OAAO,CAAC;IACxB,KAAK,EAAC,MAAM,CAAC;IACb,eAAe,CAAC,EAAC,MAAM,CAAC;IACxB,IAAI,CAAC,EAAC,MAAM,CAAC;IACb,eAAe,CAAC,EAAC,MAAM,CAAC;IACxB,UAAU,EAAC,CAAC,QAAQ,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,EAAC,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,QAAQ,oFAAqF,aAAa,sBAkR/G,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PollOptionCard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollOptionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"PollOptionCard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollOptionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKxF,KAAK,mBAAmB,GAAG;IACvB,WAAW,EAAC,eAAe,CAAC;IAC5B,cAAc,CAAC,EAAC,OAAO,CAAC;IACxB,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,aAAa,CAAC,EAAC,iBAAiB,CAAC;IACjC,YAAY,CAAC,EAAC,gBAAgB,CAAC;IAC/B,YAAY,EAAC,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,CAAA;CACvD,CAAA;AACD,QAAA,MAAM,cAAc,sGAAwG,mBAAmB,sBA0F9I,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PollQuestionsSection.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollQuestionsSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAMlF,KAAK,yBAAyB,GAAG;IAC7B,aAAa,EAAC,iBAAiB,CAAC;IAChC,KAAK,EAAC,SAAS,EAAE,CAAC;IAClB,cAAc,EAAC,iBAAiB,EAAE,CAAC;IACnC,YAAY,EAAC,CAAC,CAAC,EAAC,SAAS,KAAK,IAAI,CAAA;CACrC,CAAA;AAED,QAAA,MAAM,oBAAoB,2DAA2D,yBAAyB,
|
|
1
|
+
{"version":3,"file":"PollQuestionsSection.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollQuestionsSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAMlF,KAAK,yBAAyB,GAAG;IAC7B,aAAa,EAAC,iBAAiB,CAAC;IAChC,KAAK,EAAC,SAAS,EAAE,CAAC;IAClB,cAAc,EAAC,iBAAiB,EAAE,CAAC;IACnC,YAAY,EAAC,CAAC,CAAC,EAAC,SAAS,KAAK,IAAI,CAAA;CACrC,CAAA;AAED,QAAA,MAAM,oBAAoB,2DAA2D,yBAAyB,sBAoD7G,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -10,6 +10,6 @@ type PollSelectCardProps = {
|
|
|
10
10
|
poll_response?: PollResponseProps;
|
|
11
11
|
onSelect: (poll: PollProps) => void;
|
|
12
12
|
};
|
|
13
|
-
declare const PollSelectCard: ({ poll, disabled,
|
|
13
|
+
declare const PollSelectCard: ({ poll, disabled, poll_campaign, poll_response, show_response, response_option, onSelect }: PollSelectCardProps) => React.JSX.Element;
|
|
14
14
|
export default PollSelectCard;
|
|
15
15
|
//# sourceMappingURL=PollSelectCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PollSelectCard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollSelectCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PollSelectCard.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/PollSelectCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAKnG,KAAK,mBAAmB,GAAG;IACvB,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,aAAa,EAAC,iBAAiB,CAAC;IAChC,IAAI,EAAC,SAAS,CAAC;IACf,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,aAAa,CAAC,EAAC,OAAO,CAAC;IACvB,eAAe,CAAC,EAAC,eAAe,CAAC;IACjC,aAAa,CAAC,EAAC,iBAAiB,CAAC;IACjC,QAAQ,EAAC,CAAC,IAAI,EAAC,SAAS,KAAK,IAAI,CAAA;CACpC,CAAA;AAED,QAAA,MAAM,cAAc,+FAA+F,mBAAmB,sBAsFrI,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -5,12 +5,11 @@ type PollCampaignModuleProps = {
|
|
|
5
5
|
poll_id?: string;
|
|
6
6
|
player_id?: string;
|
|
7
7
|
distinct_id: string;
|
|
8
|
-
height: number;
|
|
9
8
|
onEvent?: (be_event: BEEventProps) => void;
|
|
10
9
|
onRequestAuthenticate: (auth_strategy_id?: string, company_id?: string) => void;
|
|
11
10
|
onSharePollCampaign: (poll_campaign: PollCampaignProps) => void;
|
|
12
11
|
onComplete: () => void;
|
|
13
12
|
};
|
|
14
|
-
declare const PollCampaign: ({
|
|
13
|
+
declare const PollCampaign: ({ distinct_id, poll_campaign_id, player_id, onRequestAuthenticate }: PollCampaignModuleProps) => React.JSX.Element;
|
|
15
14
|
export default PollCampaign;
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Poll/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAyB,iBAAiB,EAAiD,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Poll/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAyB,iBAAiB,EAAiD,MAAM,UAAU,CAAC;AAUtI,KAAK,uBAAuB,GAAG;IAC3B,gBAAgB,EAAC,MAAM,CAAC;IACxB,OAAO,CAAC,EAAC,MAAM,CAAC;IAChB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,WAAW,EAAC,MAAM,CAAC;IACnB,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,qBAAqB,EAAE,CAAC,gBAAgB,CAAC,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IAC9E,mBAAmB,EAAE,CAAC,aAAa,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAC/D,UAAU,EAAC,MAAM,IAAI,CAAA;CACxB,CAAA;AAGD,QAAA,MAAM,YAAY,wEAAyE,uBAAuB,sBAqOjH,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import type { AthleteProps, BestAvailableOrderProps, EventOrderStatProps, EventProps, LeagueProps, MarketProps, MarketSideOptionProps, OrderProps, TradeProps } from "../../../types"
|
|
3
|
-
import MarketButton from '
|
|
3
|
+
import MarketButton from '../MarketButton';
|
|
4
4
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
5
5
|
import Colors from '../../../constants/colors';
|
|
6
6
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import type { AthleteProps, BestAvailableOrderProps, EventOrderStatProps, MarketProps, MarketSideOptionProps, OrderProps, TournamentProps, TradeProps } from "../../../types"
|
|
3
|
-
import MarketButton from '
|
|
3
|
+
import MarketButton from '../MarketButton';
|
|
4
4
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
5
5
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
6
6
|
import { MarketComponentHelpers } from '../../api';
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
2
2
|
import { Image } from 'react-native';
|
|
3
3
|
import type { BestAvailableOrderProps, EventOrderStatProps, EventProps, MarketProps, MarketSideOptionProps, OrderProps, TradeProps } from '../../../types';
|
|
4
4
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
5
|
-
import MarketButton from '
|
|
5
|
+
import MarketButton from '../MarketButton';
|
|
6
6
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
7
7
|
import { TeamEventMarketHelpers } from '../TeamEventMarket/api';
|
|
8
8
|
import { MarketComponentHelpers } from '../../api';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import type { AthleteProps, BestAvailableOrderProps, EventOrderStatProps, LeagueProps, MarketProps, MarketSideOptionProps, MatchProps, OrderProps, TeamProps, TournamentProps, TradeProps } from "../../../types"
|
|
3
|
-
import MarketButton from '
|
|
3
|
+
import MarketButton from '../MarketButton';
|
|
4
4
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
5
5
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
6
6
|
import { MarketComponentHelpers } from '../../api';
|
|
@@ -4,10 +4,10 @@ import type { AthleteProps, BEEventProps, BestAvailableOrderProps, CompanyProps,
|
|
|
4
4
|
import { view_styles } from '../../../constants/styles';
|
|
5
5
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
6
6
|
import {TeamEventMarketHelpers} from './api';
|
|
7
|
-
import MarketButton from '
|
|
7
|
+
import MarketButton from '../MarketButton';
|
|
8
8
|
import Colors from '../../../constants/colors';
|
|
9
|
-
import AthleteMarket from '
|
|
10
|
-
import EventMarket from '
|
|
9
|
+
import AthleteMarket from '../AthleteMarket';
|
|
10
|
+
import EventMarket from '../EventMarket';
|
|
11
11
|
|
|
12
12
|
import { MarketComponentApi, MarketComponentHelpers } from '../../api';
|
|
13
13
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
@@ -284,11 +284,12 @@ const TeamEventMarket = ({ event, league, float, style, init_expanded, hot_marke
|
|
|
284
284
|
const event_trades = latest_trades.filter(t => t.market_type == 'FOR_MONEY' && t.market_id == data.item.market_id);
|
|
285
285
|
const event_orders = best_available_orders.filter(t => t.market_id == data.item.market_id);
|
|
286
286
|
return (
|
|
287
|
-
<View transparent
|
|
287
|
+
<View transparent>
|
|
288
288
|
<EventMarket
|
|
289
289
|
event={event}
|
|
290
290
|
market={market}
|
|
291
291
|
float
|
|
292
|
+
style={{ flexGrow:1, margin:5 }}
|
|
292
293
|
direction={hot_markets_direction=='vertical' ? 'horizontal' : 'vertical'}
|
|
293
294
|
hide_liquidity={hide_liquidity}
|
|
294
295
|
onTradeLongPress={onTradeLongPress}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import type { BestAvailableOrderProps, EventOrderStatProps, MarketProps, MarketSideOptionProps, OrderProps, TeamProps, TournamentProps, TradeProps } from "../../../types"
|
|
3
3
|
import { view_styles } from '../../../constants/styles';
|
|
4
|
-
import MarketButton from '
|
|
4
|
+
import MarketButton from '../MarketButton';
|
|
5
5
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
6
6
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
7
7
|
import { MarketComponentHelpers } from '../../api';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Image
|
|
2
|
+
import { Image} from 'react-native';
|
|
3
3
|
import type { PollCampaignProps } from '../../types';
|
|
4
|
-
import { Icons
|
|
5
|
-
import
|
|
4
|
+
import { Icons } from '../../Components';
|
|
5
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
6
|
+
import { useColors } from '../../constants/useColors';
|
|
6
7
|
|
|
7
8
|
type CampaignHeaderProps = {
|
|
8
9
|
poll_campaign:PollCampaignProps,
|
|
@@ -10,23 +11,23 @@ type CampaignHeaderProps = {
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
const CampaignHeader = ({ poll_campaign, onSharePollCampaign }:CampaignHeaderProps) => {
|
|
13
|
-
|
|
14
|
+
const Colors = useColors();
|
|
14
15
|
return (
|
|
15
16
|
<View>
|
|
16
|
-
<View nativeID="competition_header" style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1
|
|
17
|
-
<View>
|
|
17
|
+
<View type='header' nativeID="competition_header" style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1 }}>
|
|
18
|
+
<View transparent>
|
|
18
19
|
<Image
|
|
19
20
|
source={{ uri: poll_campaign.campaign_image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1649737862/be_logo_jte2ux.webp' }}
|
|
20
|
-
style={{ height:50, width:50, borderRadius:4 }}
|
|
21
|
+
style={{ height:50, width:50, borderRadius:4, backgroundColor:Colors.text.white, padding:5 }}
|
|
21
22
|
resizeMode="cover"
|
|
22
23
|
/>
|
|
23
24
|
</View>
|
|
24
|
-
<View style={{ flex:1, marginLeft:10 }}>
|
|
25
|
-
<Text theme='
|
|
25
|
+
<View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
|
|
26
|
+
<Text theme='h1'>{poll_campaign.name}</Text>
|
|
26
27
|
</View>
|
|
27
|
-
<
|
|
28
|
-
<Icons.ShareIcon color={Colors.
|
|
29
|
-
</
|
|
28
|
+
<Button onPress={() => onSharePollCampaign(poll_campaign)}>
|
|
29
|
+
<Icons.ShareIcon color={Colors.text.h1} size={14} />
|
|
30
|
+
</Button>
|
|
30
31
|
</View>
|
|
31
32
|
</View>
|
|
32
33
|
)
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Image, FlatList, ActivityIndicator } from "react-native"
|
|
3
3
|
import type { PollCampaignLeaderProps, PollCampaignProps, PublicPlayerProps } from '../../types';
|
|
4
4
|
import { PollCampaignApi } from '../api';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { Icons } from '../../Components';
|
|
6
|
+
import { useColors } from '../../constants/useColors';
|
|
7
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
8
|
+
import Pagination from '../../Components/Pagination';
|
|
8
9
|
|
|
9
10
|
type CampaignLeaderboardProps = {
|
|
10
11
|
poll_campaign:PollCampaignProps,
|
|
11
12
|
view_mode: "short"|"full",
|
|
12
|
-
height?:number,
|
|
13
13
|
onShowFullLeaderboard?: () => void,
|
|
14
14
|
onClose?:() => void
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const CampaignLeaderboard = ({ poll_campaign,
|
|
17
|
+
const CampaignLeaderboard = ({ poll_campaign, view_mode, onShowFullLeaderboard, onClose }:CampaignLeaderboardProps) => {
|
|
18
|
+
const Colors = useColors();
|
|
18
19
|
const [ leaderboard_data, setLeaderData ] = useState<{
|
|
19
20
|
loading:boolean,
|
|
20
21
|
offset:number,
|
|
@@ -60,9 +61,9 @@ const CampaignLeaderboard = ({ poll_campaign, height, view_mode, onShowFullLeade
|
|
|
60
61
|
|
|
61
62
|
const renderTrophy = (place:number) => {
|
|
62
63
|
switch(place){
|
|
63
|
-
case 1: return <Icons.TrophyIcon color={Colors.
|
|
64
|
-
case 2: return <Icons.TrophyIcon color={Colors.
|
|
65
|
-
case 3: return <Icons.TrophyIcon color={Colors.
|
|
64
|
+
case 1: return <Icons.TrophyIcon color={Colors.text.gold} size={16}/>
|
|
65
|
+
case 2: return <Icons.TrophyIcon color={Colors.text.silver} size={16}/>
|
|
66
|
+
case 3: return <Icons.TrophyIcon color={Colors.text.bronze} size={16}/>
|
|
66
67
|
default: return <></>
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -72,11 +73,11 @@ const CampaignLeaderboard = ({ poll_campaign, height, view_mode, onShowFullLeade
|
|
|
72
73
|
const player = players.find(p => p.player_id == data.item.player_id);
|
|
73
74
|
if(!player){ return <></> }
|
|
74
75
|
return (
|
|
75
|
-
<View style={{ flexDirection:'row', alignItems:'center', margin:4, padding:5, borderRadius:22
|
|
76
|
-
<View nativeID="place" style={{ margin:5, height:20, width:20, justifyContent:'center', alignItems:'center', borderRadius:100, borderWidth:1
|
|
77
|
-
<Text size={10} color={Colors.
|
|
76
|
+
<View float style={{ flexDirection:'row', alignItems:'center', margin:4, padding:5, borderRadius:22 }}>
|
|
77
|
+
<View transparent nativeID="place" style={{ margin:5, height:20, width:20, justifyContent:'center', alignItems:'center', borderRadius:100, borderWidth:1 }}>
|
|
78
|
+
<Text size={10} color={Colors.text.h1} weight='bold' textAlign="center">{offset > 0 ? offset:''}{data.index+1}</Text>
|
|
78
79
|
</View>
|
|
79
|
-
<View nativeID="player" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
|
|
80
|
+
<View transparent nativeID="player" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
|
|
80
81
|
<View nativeID="profile_pic" style={{ marginRight:10 }}>
|
|
81
82
|
<Image
|
|
82
83
|
source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1689262384/default-avatar_bbkn2t.png' }}
|
|
@@ -84,11 +85,11 @@ const CampaignLeaderboard = ({ poll_campaign, height, view_mode, onShowFullLeade
|
|
|
84
85
|
resizeMode='cover'
|
|
85
86
|
/>
|
|
86
87
|
</View>
|
|
87
|
-
<View style={{ flex:1 }} nativeID="name">
|
|
88
|
-
<Text size={14} color={Colors.
|
|
89
|
-
<Text style={{ marginTop:3 }} size={12} color={Colors.
|
|
88
|
+
<View transparent style={{ flex:1 }} nativeID="name">
|
|
89
|
+
<Text size={14} color={Colors.text.h1} weight='bold'>{player.username}</Text>
|
|
90
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.text.h1} weight='regular'>{data.item.winnings.toFixed(2)} Points</Text>
|
|
90
91
|
</View>
|
|
91
|
-
<View>
|
|
92
|
+
<View float style={{ padding:5, borderRadius:100 }}>
|
|
92
93
|
{renderTrophy(data.index+1)}
|
|
93
94
|
</View>
|
|
94
95
|
</View>
|
|
@@ -97,77 +98,65 @@ const CampaignLeaderboard = ({ poll_campaign, height, view_mode, onShowFullLeade
|
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
return (
|
|
100
|
-
<View style={{ flex:1
|
|
101
|
+
<View style={{ flex:1}}>
|
|
101
102
|
{my_leader && me ?
|
|
102
|
-
<View nativeID="my_results" style={{
|
|
103
|
-
<Text style={{ padding:10 }} size={14}
|
|
104
|
-
<View style={{ flexDirection:'row', alignItems:'center', margin:4, padding:5, borderRadius:22
|
|
105
|
-
<View nativeID="player" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
|
|
106
|
-
<View nativeID="profile_pic" style={{ marginRight:10 }}>
|
|
103
|
+
<View type='header' nativeID="my_results" style={{ padding:10 }}>
|
|
104
|
+
<Text style={{ padding:10 }} size={14} theme='h1' weight='bold'>My Results</Text>
|
|
105
|
+
<View float style={{ flexDirection:'row', alignItems:'center', margin:4, padding:5, borderRadius:22 }}>
|
|
106
|
+
<View transparent nativeID="player" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
|
|
107
|
+
<View transparent nativeID="profile_pic" style={{ marginRight:10 }}>
|
|
107
108
|
<Image
|
|
108
109
|
source={{ uri: me.profile_pic && me.profile_pic != '' ? me.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1689262384/default-avatar_bbkn2t.png' }}
|
|
109
110
|
style={{ height:35, width:35, borderRadius:100 }}
|
|
110
111
|
resizeMode='cover'
|
|
111
112
|
/>
|
|
112
113
|
</View>
|
|
113
|
-
<View style={{ flex:1 }} nativeID="name">
|
|
114
|
-
<Text size={14}
|
|
115
|
-
<Text style={{ marginTop:3 }} size={12}
|
|
114
|
+
<View transparent style={{ flex:1 }} nativeID="name">
|
|
115
|
+
<Text size={14} theme='h1' weight='bold'>{me.username}</Text>
|
|
116
|
+
<Text style={{ marginTop:3 }} size={12} theme='description' weight='regular'>{my_leader.winnings.toFixed(2)} Points</Text>
|
|
116
117
|
</View>
|
|
117
|
-
<View>
|
|
118
|
+
<View float style={{ padding:5, borderRadius:100 }}>
|
|
118
119
|
{renderTrophy(my_leader.place)}
|
|
119
120
|
</View>
|
|
120
121
|
</View>
|
|
121
122
|
</View>
|
|
122
123
|
</View>
|
|
123
124
|
:<></>}
|
|
124
|
-
<
|
|
125
|
+
<View style={{flex:1, padding:15 }}>
|
|
125
126
|
{loading ?
|
|
126
|
-
|
|
127
|
+
<ActivityIndicator size='large' color={Colors.text.h1} style={{ padding:20, alignSelf:'center' }} />
|
|
127
128
|
:<></>}
|
|
128
129
|
<FlatList
|
|
129
130
|
data={filtered_leaders}
|
|
130
131
|
renderItem={renderLeaders}
|
|
131
132
|
keyExtractor={((item) => item.player_id.toString())}
|
|
132
133
|
/>
|
|
133
|
-
</
|
|
134
|
+
</View>
|
|
134
135
|
{view_mode == 'full' ?
|
|
135
|
-
<View
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
backgroundColor='transparent'
|
|
141
|
-
onPress={() => getDataFromServer(offset - 1)}
|
|
142
|
-
/>
|
|
143
|
-
:<></>}
|
|
144
|
-
<View style={{flex:1}} />
|
|
145
|
-
<Button
|
|
146
|
-
title='NEXT'
|
|
147
|
-
title_color={Colors.brand.electric}
|
|
148
|
-
backgroundColor='transparent'
|
|
149
|
-
onPress={() => getDataFromServer(offset + 1)}
|
|
136
|
+
<View>
|
|
137
|
+
<Pagination
|
|
138
|
+
offset={offset}
|
|
139
|
+
onNext={() => getDataFromServer(offset + 1)}
|
|
140
|
+
onPrevious={() => getDataFromServer(offset - 1)}
|
|
150
141
|
/>
|
|
151
142
|
</View>
|
|
152
143
|
:<></>}
|
|
153
144
|
{view_mode == 'short' && onShowFullLeaderboard ?
|
|
154
|
-
<View style={{
|
|
145
|
+
<View type='footer' style={{ flexDirection:'row', padding:10 }}>
|
|
155
146
|
<Button
|
|
156
147
|
title='See Full Leaderboard'
|
|
157
|
-
style={{ flex:1, alignSelf:'center' }}
|
|
158
|
-
|
|
159
|
-
backgroundColor='transparent'
|
|
148
|
+
style={{ flex:1, alignSelf:'center', padding:0 }}
|
|
149
|
+
type='text'
|
|
160
150
|
onPress={() => onShowFullLeaderboard()}
|
|
161
151
|
/>
|
|
162
152
|
</View>
|
|
163
153
|
:<></>}
|
|
164
154
|
{onClose ?
|
|
165
|
-
<View style={{
|
|
155
|
+
<View type='footer' style={{ flexDirection:'row', padding:10 }}>
|
|
166
156
|
<Button
|
|
167
157
|
title='CLOSE'
|
|
168
158
|
style={{ flex:1 }}
|
|
169
|
-
|
|
170
|
-
backgroundColor={Colors.utility.error}
|
|
159
|
+
type='close'
|
|
171
160
|
onPress={() => onClose()}
|
|
172
161
|
/>
|
|
173
162
|
</View>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FlatList
|
|
1
|
+
import { FlatList } from "react-native"
|
|
2
2
|
import React, { useState } from "react"
|
|
3
3
|
import type { PollCampaignProps, PollProps, PollResponseProps } from '../../types';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import { Icons } from '../../Components';
|
|
5
|
+
import { useColors } from "../../constants/useColors";
|
|
6
|
+
import { Button, Text, View } from "../../Components/Themed";
|
|
6
7
|
|
|
7
8
|
type CampaignProgressBarProps = {
|
|
8
9
|
poll_campaign:PollCampaignProps,
|
|
@@ -13,25 +14,26 @@ type CampaignProgressBarProps = {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const CampaignProgressBar = ({ poll_responses, active_poll, polls, onPollSelect}:CampaignProgressBarProps) => {
|
|
17
|
+
const Colors = useColors();
|
|
16
18
|
const [ progress_width, setProgressWidth ] = useState(0)
|
|
17
19
|
const getBarColor = (pr:PollResponseProps) => {
|
|
18
20
|
switch(pr.result_ind){
|
|
19
|
-
case 'win': return Colors.
|
|
20
|
-
case 'lose': return Colors.
|
|
21
|
-
default: return Colors.
|
|
21
|
+
case 'win': return Colors.text.success
|
|
22
|
+
case 'lose': return Colors.text.error
|
|
23
|
+
default: return Colors.text.warning
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
const renderProgress = (data: {item: PollProps, index:number }) => {
|
|
26
28
|
let width = progress_width / polls.length
|
|
27
|
-
let color = Colors.
|
|
29
|
+
let color = Colors.text.white
|
|
28
30
|
let response = poll_responses.find(pr => pr.poll_id == data.item.poll_id)
|
|
29
31
|
if(response){ color = getBarColor(response) }
|
|
30
32
|
const active = active_poll == data.item.poll_id ? true : false
|
|
31
33
|
return (
|
|
32
|
-
<
|
|
34
|
+
<Button
|
|
33
35
|
onPress={() => onPollSelect(data.item)}
|
|
34
|
-
style={{ margin:2, borderWidth:active?2:0, borderColor:Colors.brand.midnight, borderRadius:4, height:20, width: width - 4, backgroundColor:color }}
|
|
36
|
+
style={{ margin:2, borderWidth:active?2:0, padding:0, borderColor:Colors.absolutes.brand.midnight, borderRadius:4, height:20, width: width - 4, backgroundColor:color }}
|
|
35
37
|
/>
|
|
36
38
|
)
|
|
37
39
|
}
|
|
@@ -41,9 +43,9 @@ const CampaignProgressBar = ({ poll_responses, active_poll, polls, onPollSelect}
|
|
|
41
43
|
|
|
42
44
|
return (
|
|
43
45
|
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
44
|
-
<View nativeID="questions_answered" style={{ flexDirection:'row', alignItems:'center', margin:5, borderRadius:4,
|
|
45
|
-
<Icons.UserIcon color={Colors.
|
|
46
|
-
<Text style={{ marginLeft:5 }} size={12} color={Colors.
|
|
46
|
+
<View nativeID="questions_answered" style={{ flexDirection:'row', alignItems:'center', margin:5, borderRadius:4, padding:5 }}>
|
|
47
|
+
<Icons.UserIcon color={Colors.text.h1} size={12} />
|
|
48
|
+
<Text style={{ marginLeft:5 }} size={12} color={Colors.text.h1} weight='semibold'>{questions_answered}</Text>
|
|
47
49
|
</View>
|
|
48
50
|
<View nativeID="progress_bar" style={{ flex:1 }} onLayout={(ev) => {
|
|
49
51
|
const { width } = ev.nativeEvent.layout;
|
|
@@ -56,9 +58,9 @@ const CampaignProgressBar = ({ poll_responses, active_poll, polls, onPollSelect}
|
|
|
56
58
|
renderItem={renderProgress}
|
|
57
59
|
/>
|
|
58
60
|
</View>
|
|
59
|
-
<View nativeID="questions_answered" style={{ flexDirection:'row', alignItems:'center', margin:5, borderRadius:4, backgroundColor:Colors.
|
|
60
|
-
<Icons.ListIcon color={Colors.
|
|
61
|
-
<Text style={{ marginLeft:5 }} size={12} color={Colors.
|
|
61
|
+
<View nativeID="questions_answered" style={{ flexDirection:'row', alignItems:'center', margin:5, borderRadius:4, backgroundColor:Colors.text.warning, padding:5 }}>
|
|
62
|
+
<Icons.ListIcon color={Colors.text.white} size={12} />
|
|
63
|
+
<Text style={{ marginLeft:5 }} size={12} color={Colors.text.white} weight='semibold'>{questions_unanswered}</Text>
|
|
62
64
|
</View>
|
|
63
65
|
</View>
|
|
64
66
|
)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TouchableOpacity, View } from "react-native"
|
|
2
1
|
import React, { useState } from "react"
|
|
3
2
|
import type { PollCampaignProps } from "../../types"
|
|
4
|
-
import { Icons
|
|
5
|
-
import Colors from '../../constants/colors';
|
|
6
|
-
import { view_styles } from "../../constants/styles"
|
|
3
|
+
import { Icons } from "../../Components"
|
|
7
4
|
import CampaignLeaderboard from "./CampaignLeaderboard"
|
|
5
|
+
import { Button, Text, View } from "../../Components/Themed"
|
|
6
|
+
import { useColors } from "../../constants/useColors"
|
|
8
7
|
|
|
9
8
|
type CampaignResultProps = {
|
|
10
9
|
poll_campaign:PollCampaignProps,
|
|
@@ -13,19 +12,20 @@ type CampaignResultProps = {
|
|
|
13
12
|
|
|
14
13
|
const CampaignResult = ({ poll_campaign, onShowFullLeaderboard } : CampaignResultProps) => {
|
|
15
14
|
const [ expanded, setExpanded ] = useState(false);
|
|
15
|
+
const Colors = useColors();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<View style={{ flex:1
|
|
19
|
-
<
|
|
20
|
-
<Icons.PodiumIcon size={18} color={Colors.
|
|
21
|
-
<View style={{flex:1, marginLeft:10}}>
|
|
22
|
-
<Text theme="
|
|
23
|
-
<Text style={{ marginTop:3 }} theme="
|
|
18
|
+
<View float style={{ flex:1 }}>
|
|
19
|
+
<Button style={{ flexDirection:'row', alignItems:'center', padding:20, backgroundColor:Colors.views.header }} onPress={() => setExpanded(!expanded)}>
|
|
20
|
+
<Icons.PodiumIcon size={18} color={Colors.text.h1} />
|
|
21
|
+
<View transparent style={{flex:1, marginLeft:10}}>
|
|
22
|
+
<Text theme="h1">Leaderboard</Text>
|
|
23
|
+
<Text style={{ marginTop:3 }} theme="description">Below are the leaderboard results!</Text>
|
|
24
24
|
</View>
|
|
25
|
-
<Icons.ChevronIcon size={8} color={Colors.
|
|
26
|
-
</
|
|
25
|
+
<Icons.ChevronIcon size={8} color={Colors.text.h1} direction={expanded ? 'up' : 'down'} />
|
|
26
|
+
</Button>
|
|
27
27
|
{expanded ?
|
|
28
|
-
<View style={{
|
|
28
|
+
<View style={{ padding:0 }}>
|
|
29
29
|
<CampaignLeaderboard
|
|
30
30
|
view_mode="short"
|
|
31
31
|
poll_campaign={poll_campaign}
|