be-components 4.2.0 → 4.2.2
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/Competition/components/CompetitionLeaderboard.js +12 -23
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -1
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +191 -100
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -1
- package/lib/commonjs/Competition/components/WagerPickForm.js +8 -2
- package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -1
- package/lib/commonjs/Competition/index.js +49 -9
- package/lib/commonjs/Competition/index.js.map +1 -1
- package/lib/commonjs/Components/ConfirmationModal.js +11 -3
- package/lib/commonjs/Components/ConfirmationModal.js.map +1 -1
- package/lib/commonjs/Components/SearchBox.js +3 -1
- package/lib/commonjs/Components/SearchBox.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/ContestOrderStatsCard.js +2 -0
- package/lib/commonjs/MarketComponents/components/ContestOrderStatsCard.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/Contest.js +39 -41
- package/lib/commonjs/MarketMaker/components/Contest.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/ContestSelector.js +48 -30
- package/lib/commonjs/MarketMaker/components/ContestSelector.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/Dashboard.js +14 -73
- package/lib/commonjs/MarketMaker/components/Dashboard.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/FundOwnershipList.js +27 -30
- package/lib/commonjs/MarketMaker/components/FundOwnershipList.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/FundSelector.js +30 -33
- package/lib/commonjs/MarketMaker/components/FundSelector.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/FundingRequestList.js +28 -41
- package/lib/commonjs/MarketMaker/components/FundingRequestList.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/ManageFundForm.js +1 -1
- package/lib/commonjs/MarketMaker/components/ManageFundForm.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/MarketSelector.js +26 -24
- package/lib/commonjs/MarketMaker/components/MarketSelector.js.map +1 -1
- package/lib/commonjs/MarketMaker/components/OrderForm.js +7 -4
- package/lib/commonjs/MarketMaker/components/OrderForm.js.map +1 -1
- package/lib/commonjs/MarketMaker/index.js +301 -227
- package/lib/commonjs/MarketMaker/index.js.map +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/commonjs/Squares/index.js +28 -9
- package/lib/commonjs/Squares/index.js.map +1 -1
- package/lib/module/Competition/components/CompetitionLeaderboard.js +12 -23
- package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -1
- package/lib/module/Competition/components/EnterCompetitionPrompt.js +191 -100
- package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -1
- package/lib/module/Competition/components/WagerPickForm.js +8 -2
- package/lib/module/Competition/components/WagerPickForm.js.map +1 -1
- package/lib/module/Competition/index.js +49 -9
- package/lib/module/Competition/index.js.map +1 -1
- package/lib/module/Components/ConfirmationModal.js +11 -3
- package/lib/module/Components/ConfirmationModal.js.map +1 -1
- package/lib/module/Components/SearchBox.js +3 -1
- package/lib/module/Components/SearchBox.js.map +1 -1
- package/lib/module/MarketComponents/components/ContestOrderStatsCard.js +2 -0
- package/lib/module/MarketComponents/components/ContestOrderStatsCard.js.map +1 -1
- package/lib/module/MarketMaker/components/Contest.js +21 -24
- package/lib/module/MarketMaker/components/Contest.js.map +1 -1
- package/lib/module/MarketMaker/components/ContestSelector.js +43 -25
- package/lib/module/MarketMaker/components/ContestSelector.js.map +1 -1
- package/lib/module/MarketMaker/components/Dashboard.js +9 -66
- package/lib/module/MarketMaker/components/Dashboard.js.map +1 -1
- package/lib/module/MarketMaker/components/FundOwnershipList.js +19 -22
- package/lib/module/MarketMaker/components/FundOwnershipList.js.map +1 -1
- package/lib/module/MarketMaker/components/FundSelector.js +24 -27
- package/lib/module/MarketMaker/components/FundSelector.js.map +1 -1
- package/lib/module/MarketMaker/components/FundingRequestList.js +18 -31
- package/lib/module/MarketMaker/components/FundingRequestList.js.map +1 -1
- package/lib/module/MarketMaker/components/ManageFundForm.js +1 -1
- package/lib/module/MarketMaker/components/ManageFundForm.js.map +1 -1
- package/lib/module/MarketMaker/components/MarketSelector.js +19 -17
- package/lib/module/MarketMaker/components/MarketSelector.js.map +1 -1
- package/lib/module/MarketMaker/components/OrderForm.js +7 -4
- package/lib/module/MarketMaker/components/OrderForm.js.map +1 -1
- package/lib/module/MarketMaker/index.js +298 -223
- package/lib/module/MarketMaker/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/module/Squares/index.js +28 -9
- package/lib/module/Squares/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/EnterCompetitionPrompt.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/WagerPickForm.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Competition/components/WagerPickForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Competition/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/ConfirmationModal.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Components/ConfirmationModal.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/SearchBox.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Components/SearchBox.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/ContestOrderStatsCard.d.ts +2 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/ContestOrderStatsCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/Contest.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/ContestSelector.d.ts +1 -2
- package/lib/typescript/lib/commonjs/MarketMaker/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/Dashboard.d.ts +1 -2
- package/lib/typescript/lib/commonjs/MarketMaker/components/Dashboard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/FundOwnershipList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/FundSelector.d.ts +1 -2
- package/lib/typescript/lib/commonjs/MarketMaker/components/FundSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/FundingRequestList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/MarketSelector.d.ts +1 -2
- package/lib/typescript/lib/commonjs/MarketMaker/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/components/OrderForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketMaker/index.d.ts.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/commonjs/Squares/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Squares/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/EnterCompetitionPrompt.d.ts +2 -1
- package/lib/typescript/lib/module/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/WagerPickForm.d.ts +3 -1
- package/lib/typescript/lib/module/Competition/components/WagerPickForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/index.d.ts +2 -1
- package/lib/typescript/lib/module/Competition/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/ConfirmationModal.d.ts +2 -1
- package/lib/typescript/lib/module/Components/ConfirmationModal.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/SearchBox.d.ts +2 -1
- package/lib/typescript/lib/module/Components/SearchBox.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Spring.d.ts +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/ContestOrderStatsCard.d.ts +2 -1
- package/lib/typescript/lib/module/MarketComponents/components/ContestOrderStatsCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/Contest.d.ts +1 -2
- package/lib/typescript/lib/module/MarketMaker/components/Contest.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/ContestSelector.d.ts +2 -4
- package/lib/typescript/lib/module/MarketMaker/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/Dashboard.d.ts +2 -4
- package/lib/typescript/lib/module/MarketMaker/components/Dashboard.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/FundOwnershipList.d.ts +1 -2
- package/lib/typescript/lib/module/MarketMaker/components/FundOwnershipList.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/FundSelector.d.ts +2 -4
- package/lib/typescript/lib/module/MarketMaker/components/FundSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/FundingRequestList.d.ts +1 -2
- package/lib/typescript/lib/module/MarketMaker/components/FundingRequestList.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/MarketSelector.d.ts +2 -4
- package/lib/typescript/lib/module/MarketMaker/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/components/OrderForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketMaker/index.d.ts +1 -2
- package/lib/typescript/lib/module/MarketMaker/index.d.ts.map +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/lib/module/Squares/index.d.ts +2 -1
- package/lib/typescript/lib/module/Squares/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +2 -1
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +3 -1
- package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -1
- package/lib/typescript/src/Competition/index.d.ts +2 -1
- package/lib/typescript/src/Competition/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/ConfirmationModal.d.ts +2 -1
- package/lib/typescript/src/Components/ConfirmationModal.d.ts.map +1 -1
- package/lib/typescript/src/Components/SearchBox.d.ts +2 -1
- package/lib/typescript/src/Components/SearchBox.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/ContestOrderStatsCard.d.ts +2 -1
- package/lib/typescript/src/MarketComponents/components/ContestOrderStatsCard.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/Contest.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/ContestSelector.d.ts +1 -1
- package/lib/typescript/src/MarketMaker/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/Dashboard.d.ts +1 -1
- package/lib/typescript/src/MarketMaker/components/Dashboard.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/FundOwnershipList.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/FundSelector.d.ts +1 -2
- package/lib/typescript/src/MarketMaker/components/FundSelector.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/FundingRequestList.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/ManageFundForm.d.ts +1 -1
- package/lib/typescript/src/MarketMaker/components/ManageFundForm.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/MarketSelector.d.ts +1 -2
- package/lib/typescript/src/MarketMaker/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/components/OrderForm.d.ts +1 -1
- package/lib/typescript/src/MarketMaker/components/OrderForm.d.ts.map +1 -1
- package/lib/typescript/src/MarketMaker/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/lib/typescript/src/Squares/index.d.ts +2 -1
- package/lib/typescript/src/Squares/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Competition/components/CompetitionLeaderboard.tsx +10 -21
- package/src/Competition/components/EnterCompetitionPrompt.tsx +98 -59
- package/src/Competition/components/WagerPickForm.tsx +4 -2
- package/src/Competition/index.tsx +33 -25
- package/src/Components/ConfirmationModal.tsx +5 -4
- package/src/Components/SearchBox.tsx +4 -2
- package/src/MarketComponents/components/ContestOrderStatsCard.tsx +3 -1
- package/src/MarketMaker/components/Contest.tsx +21 -21
- package/src/MarketMaker/components/ContestSelector.tsx +31 -22
- package/src/MarketMaker/components/Dashboard.tsx +9 -24
- package/src/MarketMaker/components/FundOwnershipList.tsx +13 -15
- package/src/MarketMaker/components/FundSelector.tsx +21 -23
- package/src/MarketMaker/components/FundingRequestList.tsx +14 -20
- package/src/MarketMaker/components/ManageFundForm.tsx +2 -2
- package/src/MarketMaker/components/MarketSelector.tsx +14 -16
- package/src/MarketMaker/components/OrderForm.tsx +6 -5
- package/src/MarketMaker/index.tsx +166 -94
- 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/src/Squares/index.tsx +29 -19
- 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,12 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
4
3
|
import type { EventProps, LeagueProps, MatchProps, TournamentProps } from "../../types"
|
|
5
|
-
import {
|
|
6
|
-
import { Checkbox, Text } from '../../Components';
|
|
4
|
+
import { Checkbox } from '../../Components';
|
|
7
5
|
import DropDown from '../../Components/Dropdown';
|
|
8
6
|
import moment from 'moment-mini';
|
|
9
|
-
import
|
|
7
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
8
|
+
import SearchBox from '../../Components/SearchBox';
|
|
10
9
|
|
|
11
10
|
type ContestSelectorProps = {
|
|
12
11
|
leagues:LeagueProps[],
|
|
@@ -23,41 +22,44 @@ type ContestSelectorProps = {
|
|
|
23
22
|
onSelectMatch:(m:MatchProps) => void
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
const ContestSelector = ({
|
|
25
|
+
const ContestSelector = ({ leagues, events, onSelectEvent, selected_events, onDeselectEvent }:ContestSelectorProps) => {
|
|
27
26
|
const [ selector_data, setSelectorData ] = useState<{
|
|
28
|
-
selected_league?:LeagueProps
|
|
27
|
+
selected_league?:LeagueProps,
|
|
28
|
+
search_value:string
|
|
29
29
|
}>({
|
|
30
|
-
|
|
30
|
+
search_value: ''
|
|
31
31
|
});
|
|
32
|
-
const { selected_league } = selector_data;
|
|
32
|
+
const { selected_league, search_value } = selector_data;
|
|
33
33
|
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
if(!selected_league){ setSelectorData({ ...selector_data, selected_league: leagues.find(l => l.priority == 1) }) }
|
|
36
36
|
},[leagues.length]);
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
let filtered_events = events.filter(e => e.league_id == selected_league?.league_id).sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix());
|
|
39
|
+
if(search_value){
|
|
40
|
+
filtered_events = filtered_events.filter(e => `${e.away?.market_name} ${e.away?.name} ${e.home?.market_name} ${e.home?.name}`.toLowerCase().includes(search_value.toLowerCase()))
|
|
41
|
+
}
|
|
40
42
|
|
|
41
43
|
const renderEvents = (data:{ item:EventProps, index:number }) => {
|
|
42
44
|
const selected = selected_events.find(se => se == data.item.event_id) ? true : false;
|
|
43
45
|
return (
|
|
44
|
-
<
|
|
46
|
+
<Button style={{ padding:2, flexDirection:'row', alignItems:'center' }} onPress={() => selected ? onDeselectEvent(data.item) : onSelectEvent(data.item)}>
|
|
45
47
|
<Checkbox checked={selected} disabled onSelect={() => console.log('')}/>
|
|
46
|
-
<View style={{ flex:1, marginLeft:10 }}>
|
|
47
|
-
<Text size={12} weight='bold'
|
|
48
|
-
<Text style={{ marginTop:3 }} theme='
|
|
48
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
49
|
+
<Text size={12} weight='bold' theme='h1'>{data.item.event_title}</Text>
|
|
50
|
+
<Text style={{ marginTop:3 }} theme='light'>{data.item.time_detail == 'scheduled' ? moment(data.item.scheduled_datetime).format('MMM DD : hh:mm a') : data.item.time_detail}</Text>
|
|
49
51
|
</View>
|
|
50
|
-
</
|
|
52
|
+
</Button>
|
|
51
53
|
)
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
return (
|
|
56
|
-
<View
|
|
57
|
-
<View style={{
|
|
58
|
-
<View style={{ flex:1 }}>
|
|
59
|
-
<Text theme='
|
|
60
|
-
<Text theme='
|
|
58
|
+
<View>
|
|
59
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
60
|
+
<View transparent style={{ flex:1 }}>
|
|
61
|
+
<Text theme='h1'>Select Contest</Text>
|
|
62
|
+
<Text theme='description' style={{ marginTop:3 }}>Use league dropdown to filter</Text>
|
|
61
63
|
</View>
|
|
62
64
|
<DropDown
|
|
63
65
|
selected_value={selected_league?.league_name ?? ''}
|
|
@@ -70,7 +72,14 @@ const ContestSelector = ({ maxHeight, leagues, events, onSelectEvent, selected_e
|
|
|
70
72
|
}}
|
|
71
73
|
/>
|
|
72
74
|
</View>
|
|
73
|
-
<View style={{
|
|
75
|
+
<View type='body' style={{ maxHeight:300, overflow:'scroll' }}>
|
|
76
|
+
{selected_league ?
|
|
77
|
+
<SearchBox
|
|
78
|
+
style={{ padding:5 }}
|
|
79
|
+
button_style={{ padding:8 }}
|
|
80
|
+
onChange={(text) => setSelectorData({ ...selector_data, search_value: text })}
|
|
81
|
+
/>
|
|
82
|
+
:<></>}
|
|
74
83
|
<FlatList
|
|
75
84
|
data={filtered_events}
|
|
76
85
|
renderItem={renderEvents}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { View, ActivityIndicator } from 'react-native';
|
|
3
|
-
import { view_styles } from "../../constants/styles"
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import type { AthleteProps, BestAvailableOrderProps, EventProps, ExternalPriceProps, FundOrderProps, FundProps, LeagueProps, MarketProps, MatchProps, OrderProps, SortedContestProps, TournamentProps, TradeProps } from "../../types"
|
|
5
|
-
import { Text } from '../../Components';
|
|
6
3
|
import Contest from './Contest';
|
|
7
4
|
import { MarketMaketHelpers } from '../api';
|
|
8
|
-
import Colors from '../../constants/colors';
|
|
9
5
|
import FundActions from './FundActions';
|
|
6
|
+
import { Text, View } from '../../Components/Themed';
|
|
10
7
|
|
|
11
8
|
type DashboardProps = {
|
|
12
9
|
loaded:boolean,
|
|
@@ -32,10 +29,9 @@ type DashboardProps = {
|
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
|
|
35
|
-
const Dashboard = ({ fund,
|
|
36
|
-
const [ dash_size, setDashSize ] = useState({ height:400, width:400 });
|
|
37
|
-
console.log(dash_size)
|
|
32
|
+
const Dashboard = ({ fund, external_name, athletes, prices, leagues, events, tournaments, matches, markets, orders, fund_orders, best_available_orders, trades, onOrder, onSetMarket, onClearMarket, onWorkCapital, onLayoffCapital, onDepositFund }:DashboardProps) => {
|
|
38
33
|
const contests = MarketMaketHelpers.sortContests(events, tournaments, matches, markets)
|
|
34
|
+
|
|
39
35
|
const renderContests = (data:{item:SortedContestProps, index:number}) => {
|
|
40
36
|
if(!fund){ return <></> }
|
|
41
37
|
const league = leagues.find(l => l.league_id == data.item.league_id)
|
|
@@ -50,7 +46,7 @@ const Dashboard = ({ fund, loaded, external_name, athletes, prices, leagues, eve
|
|
|
50
46
|
const contest_prices = prices.filter(p => p.event_type == data.item.contest_type && p.event_id == data.item.id);
|
|
51
47
|
const book_prices = contest_prices.filter(p => p.external_name == external_name)
|
|
52
48
|
return (
|
|
53
|
-
<View
|
|
49
|
+
<View key={`${data.item.contest_type}${data.item.id}`}>
|
|
54
50
|
<Contest
|
|
55
51
|
contest_id={data.item.id}
|
|
56
52
|
contest_type={data.item.contest_type}
|
|
@@ -79,14 +75,11 @@ const Dashboard = ({ fund, loaded, external_name, athletes, prices, leagues, eve
|
|
|
79
75
|
}
|
|
80
76
|
|
|
81
77
|
return (
|
|
82
|
-
<View
|
|
83
|
-
|
|
84
|
-
setDashSize({ width, height })
|
|
85
|
-
}}>
|
|
86
|
-
<View style={{ ...view_styles.section_header }}>
|
|
78
|
+
<View>
|
|
79
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center' }}>
|
|
87
80
|
<View style={{ flex:1 }}>
|
|
88
|
-
<Text theme='
|
|
89
|
-
<Text style={{ marginTop:3 }} theme='
|
|
81
|
+
<Text theme='h1'>Dashboard</Text>
|
|
82
|
+
<Text style={{ marginTop:3 }} theme='description'>Select contests and markets to see activity and market options</Text>
|
|
90
83
|
</View>
|
|
91
84
|
</View>
|
|
92
85
|
{fund?
|
|
@@ -103,14 +96,6 @@ const Dashboard = ({ fund, loaded, external_name, athletes, prices, leagues, eve
|
|
|
103
96
|
return renderContests({ item: c, index:i })
|
|
104
97
|
})}
|
|
105
98
|
</View>
|
|
106
|
-
{!loaded ?
|
|
107
|
-
<View style={{ position:'absolute', top:0, left:0, right:0, bottom:0, backgroundColor:Colors.shades.black_faded, justifyContent:'center', alignItems:'center' }}>
|
|
108
|
-
<View style={{ ...view_styles.section, minWidth:200, minHeight:200, justifyContent:'center', alignItems:'center' }}>
|
|
109
|
-
<ActivityIndicator style={{ alignSelf:'center'}} size='large' color={Colors.brand.midnight} />
|
|
110
|
-
<Text style={{ marginTop:10 }} theme='header_2'>Loading Your Data...</Text>
|
|
111
|
-
</View>
|
|
112
|
-
</View>
|
|
113
|
-
:<></>}
|
|
114
99
|
</View>
|
|
115
100
|
)
|
|
116
101
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FlatList, Image } from 'react-native';
|
|
3
3
|
import type { FundOwnershipProps, PublicPlayerProps } from "../../types"
|
|
4
|
-
import { view_styles } from '../../constants/styles';
|
|
5
|
-
import { Text } from '../../Components';
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
7
4
|
import moment from 'moment-mini';
|
|
5
|
+
import { Text, View } from '../../Components/Themed';
|
|
8
6
|
|
|
9
7
|
type FundOwnershipListProps = {
|
|
10
8
|
fund_ownerships:FundOwnershipProps[],
|
|
@@ -16,30 +14,30 @@ const FundOwnershipList = ({ fund_ownerships, players }:FundOwnershipListProps)
|
|
|
16
14
|
const player = players.find(p => p.player_id == data.item.player_id);
|
|
17
15
|
if(!player){ return <></> }
|
|
18
16
|
return (
|
|
19
|
-
<View style={{
|
|
17
|
+
<View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
20
18
|
<Image
|
|
21
19
|
source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
22
|
-
style={{ height:
|
|
20
|
+
style={{ height:30, width:30, borderRadius:100 }}
|
|
23
21
|
resizeMode='cover'
|
|
24
22
|
/>
|
|
25
23
|
<View style={{ flex:1, marginLeft:10 }}>
|
|
26
|
-
<Text size={14}
|
|
27
|
-
<Text style={{ marginTop:3 }} size={12} weight='regular'
|
|
24
|
+
<Text size={14} theme='h1' weight='bold'>{player.first_name} {player.last_name}</Text>
|
|
25
|
+
<Text style={{ marginTop:3 }} size={12} weight='regular' theme='description'>Owner since {moment(data.item.create_datetime).format('MMM DD YYYY')}</Text>
|
|
28
26
|
</View>
|
|
29
|
-
<Text size={14} weight='bold'
|
|
27
|
+
<Text size={14} weight='bold' theme='h1'>{(data.item.ownership_pct * 100).toFixed(2)}%</Text>
|
|
30
28
|
</View>
|
|
31
29
|
)
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
return (
|
|
35
|
-
<View
|
|
36
|
-
<View style={{
|
|
37
|
-
<View style={{ flex:1 }}>
|
|
38
|
-
<Text theme='
|
|
39
|
-
<Text style={{ marginTop:3 }} theme='
|
|
33
|
+
<View>
|
|
34
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
35
|
+
<View transparent style={{ flex:1 }}>
|
|
36
|
+
<Text theme='h1'>Fund Owners</Text>
|
|
37
|
+
<Text style={{ marginTop:3 }} theme='description'>Below are the players that have invested in this fund sorted by their ownership pct.</Text>
|
|
40
38
|
</View>
|
|
41
39
|
</View>
|
|
42
|
-
<View style={{
|
|
40
|
+
<View transparent style={{ padding:0 }}>
|
|
43
41
|
<FlatList
|
|
44
42
|
key={'fund_ownerships'}
|
|
45
43
|
data={fund_ownerships.sort((a,b) => b.ownership_pct - a.ownership_pct)}
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { view_styles } from "../../constants/styles"
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
4
3
|
import type { FundProps } from '../../types';
|
|
5
|
-
import {
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
4
|
+
import { Checkbox, Icons } from '../../Components';
|
|
7
5
|
import { MarketMakerApi } from '../api';
|
|
6
|
+
import { useColors } from '../../constants/useColors';
|
|
7
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
type FundSelectorProps = {
|
|
11
11
|
funds:FundProps[],
|
|
12
12
|
selected_fund_id?:string,
|
|
13
|
-
maxHeight:number,
|
|
14
13
|
onSelectFund:(f:FundProps) => void,
|
|
15
14
|
onCreateFund:(f:FundProps) => void,
|
|
16
15
|
onEditFund:(f:FundProps) => void
|
|
17
16
|
}
|
|
18
|
-
const FundSelector = ({ selected_fund_id, funds,
|
|
19
|
-
|
|
17
|
+
const FundSelector = ({ selected_fund_id, funds, onSelectFund, onCreateFund, onEditFund }:FundSelectorProps) => {
|
|
18
|
+
const Colors = useColors();
|
|
20
19
|
const renderFunds = (data:{item:FundProps, index:number}) => {
|
|
21
20
|
const selected = selected_fund_id == data.item.fund_id ? true : false
|
|
22
21
|
return (
|
|
23
|
-
<
|
|
22
|
+
<Button style={{ padding:2, flexDirection:'row', alignItems:'center' }} onPress={() => onSelectFund(data.item)}>
|
|
24
23
|
<Checkbox checked={selected} disabled onSelect={() => console.log('')}/>
|
|
25
|
-
<View style={{ flex:1, marginLeft:10 }}>
|
|
26
|
-
<Text size={12} weight='bold'
|
|
27
|
-
<Text style={{ marginTop:3 }} theme='
|
|
24
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
25
|
+
<Text size={12} weight='bold' theme='h1'>{data.item.name}</Text>
|
|
26
|
+
<Text style={{ marginTop:3 }} theme='description'>This is a cool fund!</Text>
|
|
28
27
|
</View>
|
|
29
|
-
<
|
|
30
|
-
<Icons.EditIcon size={18} color={Colors.
|
|
31
|
-
</
|
|
32
|
-
</
|
|
28
|
+
<Button onPress={() => onEditFund(data.item)}>
|
|
29
|
+
<Icons.EditIcon size={18} color={Colors.text.action} />
|
|
30
|
+
</Button>
|
|
31
|
+
</Button>
|
|
33
32
|
)
|
|
34
33
|
}
|
|
35
34
|
return (
|
|
36
|
-
<View
|
|
37
|
-
<View style={{
|
|
38
|
-
<View style={{ flex:1 }}>
|
|
39
|
-
<Text theme='
|
|
40
|
-
<Text style={{ marginTop:3 }} theme='
|
|
35
|
+
<View>
|
|
36
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
37
|
+
<View transparent style={{ flex:1 }}>
|
|
38
|
+
<Text theme='h1'>Select Fund</Text>
|
|
39
|
+
<Text style={{ marginTop:3 }} theme='description'>Select a fund to populate the dashboard with the funds orders and data</Text>
|
|
41
40
|
</View>
|
|
42
41
|
<Button
|
|
43
42
|
title='NEW'
|
|
44
|
-
|
|
45
|
-
title_color={Colors.shades.white}
|
|
43
|
+
type='success'
|
|
46
44
|
onPress={async() => {
|
|
47
45
|
const new_fund = await MarketMakerApi.createFund('Pending Fund', 100, 'FOR_MONEY');
|
|
48
46
|
if(!new_fund){ return alert('Unable to process') }
|
|
@@ -50,7 +48,7 @@ const FundSelector = ({ selected_fund_id, funds, maxHeight, onSelectFund, onCrea
|
|
|
50
48
|
}}
|
|
51
49
|
/>
|
|
52
50
|
</View>
|
|
53
|
-
<View
|
|
51
|
+
<View transparent>
|
|
54
52
|
<FlatList
|
|
55
53
|
key={'market_selector'}
|
|
56
54
|
data={funds}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FlatList, Image } from 'react-native';
|
|
3
3
|
import type { FundingRequestProps, PublicPlayerProps } from "../../types"
|
|
4
|
-
import { view_styles } from '../../constants/styles';
|
|
5
|
-
import { Button, Text } from '../../Components';
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
7
4
|
import moment from 'moment-mini';
|
|
5
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
8
6
|
|
|
9
7
|
type FundingRequestListProps = {
|
|
10
8
|
funding_requests:FundingRequestProps[],
|
|
@@ -18,30 +16,26 @@ const FundingRequestList = ({ funding_requests, players, onApproveRequest, onDec
|
|
|
18
16
|
const player = players.find(p => p.player_id == data.item.player_id)
|
|
19
17
|
if(!player){ return <></> }
|
|
20
18
|
return (
|
|
21
|
-
<View style={{
|
|
19
|
+
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
22
20
|
<Image
|
|
23
21
|
source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
24
22
|
style={{ height:40, width:40, borderRadius:100 }}
|
|
25
23
|
resizeMode='cover'
|
|
26
24
|
/>
|
|
27
25
|
<View style={{ flex:1, marginLeft:10 }}>
|
|
28
|
-
<Text size={14}
|
|
29
|
-
<Text style={{ marginTop:3 }} size={12}
|
|
26
|
+
<Text size={14} theme='h1'>{player.first_name} {player.last_name}</Text>
|
|
27
|
+
<Text style={{ marginTop:3 }} size={12} theme='description'>Requested on {moment(data.item.create_datetime).format('MMM DD hh:mm a')}</Text>
|
|
30
28
|
</View>
|
|
31
|
-
<Text size={14} weight='bold'
|
|
29
|
+
<Text size={14} weight='bold' theme='h1'>${data.item.amount.toFixed(2)}</Text>
|
|
32
30
|
<Button
|
|
33
31
|
title='DECLINE'
|
|
34
32
|
style={{ marginRight:5, marginLeft:5 }}
|
|
35
|
-
|
|
36
|
-
backgroundColor={Colors.utility.error}
|
|
37
|
-
borderRadius={4}
|
|
33
|
+
type='error'
|
|
38
34
|
onPress={() => onDeclineRequest(data.item.funding_request_id)}
|
|
39
35
|
/>
|
|
40
36
|
<Button
|
|
41
37
|
title='APPROVE'
|
|
42
|
-
|
|
43
|
-
backgroundColor={Colors.utility.success}
|
|
44
|
-
borderRadius={4}
|
|
38
|
+
type='success'
|
|
45
39
|
onPress={() => onApproveRequest(data.item.funding_request_id)}
|
|
46
40
|
/>
|
|
47
41
|
</View>
|
|
@@ -49,14 +43,14 @@ const FundingRequestList = ({ funding_requests, players, onApproveRequest, onDec
|
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
return (
|
|
52
|
-
<View
|
|
53
|
-
<View style={{
|
|
54
|
-
<View style={{ flex:1 }}>
|
|
55
|
-
<Text theme='
|
|
56
|
-
<Text style={{ marginTop:3 }} theme='
|
|
46
|
+
<View>
|
|
47
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10}}>
|
|
48
|
+
<View transparent style={{ flex:1 }}>
|
|
49
|
+
<Text theme='h1'>Funding Requests</Text>
|
|
50
|
+
<Text style={{ marginTop:3 }} theme='description'>Below are the pending funding requests. Approve or decline them.</Text>
|
|
57
51
|
</View>
|
|
58
52
|
</View>
|
|
59
|
-
<View
|
|
53
|
+
<View transparent>
|
|
60
54
|
<FlatList
|
|
61
55
|
key={'funding_requests'}
|
|
62
56
|
data={funding_requests}
|
|
@@ -7,7 +7,7 @@ import Colors from '../../constants/colors';
|
|
|
7
7
|
import { MarketMakerApi } from '../api';
|
|
8
8
|
|
|
9
9
|
type ManageFundFormProps = {
|
|
10
|
-
fund
|
|
10
|
+
fund?: FundProps
|
|
11
11
|
onFundUpdate:(fund:FundProps) => void,
|
|
12
12
|
onClose:() => void
|
|
13
13
|
}
|
|
@@ -24,7 +24,7 @@ const ManageFundForm = ({ fund, onFundUpdate, onClose }:ManageFundFormProps) =>
|
|
|
24
24
|
setFormData({ ...form_data, draft_fund: fund })
|
|
25
25
|
},[fund])
|
|
26
26
|
|
|
27
|
-
if(!draft_fund){ return <></> }
|
|
27
|
+
if(!draft_fund || !fund){ return <></> }
|
|
28
28
|
|
|
29
29
|
const is_name_changed = fund.name != draft_fund.name ? true : false
|
|
30
30
|
|
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { view_styles } from "../../constants/styles"
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
4
3
|
import type { MarketProps } from '../../types';
|
|
5
|
-
import { Checkbox
|
|
6
|
-
import
|
|
4
|
+
import { Checkbox } from '../../Components';
|
|
5
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
type MarketSelectorProps = {
|
|
10
|
-
maxHeight?:number,
|
|
11
9
|
markets:MarketProps[],
|
|
12
10
|
selected_markets:string[],
|
|
13
11
|
onSelectMarket:(m:MarketProps) => void,
|
|
14
12
|
onDeselectMarket:(m:MarketProps) => void
|
|
15
13
|
}
|
|
16
|
-
const MarketSelector = ({
|
|
14
|
+
const MarketSelector = ({ markets, selected_markets, onSelectMarket, onDeselectMarket }:MarketSelectorProps) => {
|
|
17
15
|
|
|
18
16
|
const renderMarkets = (data:{item:MarketProps, index:number}) => {
|
|
19
17
|
const selected = selected_markets.find(se => se == data.item.market_id) ? true : false;
|
|
20
18
|
return (
|
|
21
|
-
<
|
|
19
|
+
<Button style={{ flexDirection:'row', alignItems:'center', padding:4 }} onPress={() => selected ? onDeselectMarket(data.item) : onSelectMarket(data.item)}>
|
|
22
20
|
<Checkbox checked={selected} disabled onSelect={() => console.log('')}/>
|
|
23
21
|
<View style={{ flex:1, marginLeft:10 }}>
|
|
24
|
-
<Text size={12} weight='bold'
|
|
25
|
-
<Text style={{ marginTop:3 }} theme='
|
|
22
|
+
<Text size={12} weight='bold' theme='h1'>{data.item.type == 'Stat' ? data.item.stat_label : data.item.type}</Text>
|
|
23
|
+
<Text style={{ marginTop:3 }} theme='light'>{data.item.description}</Text>
|
|
26
24
|
</View>
|
|
27
|
-
</
|
|
25
|
+
</Button>
|
|
28
26
|
)
|
|
29
27
|
}
|
|
30
28
|
return (
|
|
31
|
-
<View style={{
|
|
32
|
-
<View style={{
|
|
33
|
-
<View style={{ flex:1 }}>
|
|
34
|
-
<Text theme='
|
|
35
|
-
<Text style={{ marginTop:3 }} theme='
|
|
29
|
+
<View style={{ flex:1 }}>
|
|
30
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
31
|
+
<View transparent style={{ flex:1 }}>
|
|
32
|
+
<Text theme='h1'>Select Market</Text>
|
|
33
|
+
<Text style={{ marginTop:3 }} theme='description'>Manage the markets that are shown on the dashboard</Text>
|
|
36
34
|
</View>
|
|
37
35
|
</View>
|
|
38
|
-
<View style={{
|
|
36
|
+
<View transparent style={{ maxHeight:400 }}>
|
|
39
37
|
<FlatList
|
|
40
38
|
key={'market_selector'}
|
|
41
39
|
data={markets}
|
|
@@ -8,7 +8,7 @@ import { MarketMaketHelpers } from '../api';
|
|
|
8
8
|
|
|
9
9
|
type OrderFormProps = {
|
|
10
10
|
fund:FundProps,
|
|
11
|
-
order
|
|
11
|
+
order?:OrderProps,
|
|
12
12
|
available?:number,
|
|
13
13
|
onClose:() => void,
|
|
14
14
|
onSubmit: (order:OrderProps) => void
|
|
@@ -28,19 +28,20 @@ const OrderForm = ({ fund, order, available, onClose, onSubmit }:OrderFormProps)
|
|
|
28
28
|
if(available && available.toFixed(2) == open_amt.toFixed(2)){ available_set = true }
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
31
|
+
if(!order || !fund){ return }
|
|
31
32
|
setOdds(MarketMaketHelpers.getOddsLabel(order.odds))
|
|
32
33
|
if(available){
|
|
33
|
-
updateWorkingPctForAvailable(available)
|
|
34
|
+
updateWorkingPctForAvailable(available, fund)
|
|
34
35
|
}
|
|
35
36
|
},[order, available]);
|
|
36
37
|
|
|
37
|
-
const updateWorkingPctForAvailable = (avail:number) => {
|
|
38
|
+
const updateWorkingPctForAvailable = (avail:number, fund:FundProps) => {
|
|
38
39
|
let init_working_pct = avail / fund.working_capital
|
|
39
40
|
if(init_working_pct > 1){ init_working_pct = 1 }
|
|
40
41
|
setWorkingPct((init_working_pct*100).toFixed(2))
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
if(!order){ return <></> }
|
|
44
|
+
if(!order || !fund){ return <></> }
|
|
44
45
|
|
|
45
46
|
return (
|
|
46
47
|
<View style={{ ...view_styles.section }}>
|
|
@@ -94,7 +95,7 @@ const OrderForm = ({ fund, order, available, onClose, onSubmit }:OrderFormProps)
|
|
|
94
95
|
title_color={Colors.shades.white}
|
|
95
96
|
backgroundColor={Colors.brand.electric}
|
|
96
97
|
onPress={() => {
|
|
97
|
-
updateWorkingPctForAvailable(available)
|
|
98
|
+
updateWorkingPctForAvailable(available, fund)
|
|
98
99
|
}}
|
|
99
100
|
/>
|
|
100
101
|
</View>
|