be-components 0.7.3 → 0.7.5
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/ApiOverrides/index.js +18 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.js +113 -0
- package/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -0
- package/lib/commonjs/Authenticator/Components/StrategyForm.js +238 -71
- package/lib/commonjs/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/commonjs/Authenticator/index.js +7 -4
- package/lib/commonjs/Authenticator/index.js.map +1 -1
- package/lib/commonjs/Checkout/api/index.js.map +1 -1
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/Competition/api/index.js +655 -0
- package/lib/commonjs/Competition/api/index.js.map +1 -0
- package/lib/commonjs/Competition/components/AthleteMarketCard.js +168 -0
- package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionCard.js +180 -0
- package/lib/commonjs/Competition/components/CompetitionCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionInfoCard.js +264 -0
- package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +281 -0
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionPlay.js +1269 -0
- package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +111 -0
- package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionSelector.js +122 -0
- package/lib/commonjs/Competition/components/CompetitionSelector.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionTypeCard.js +380 -0
- package/lib/commonjs/Competition/components/CompetitionTypeCard.js.map +1 -0
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +237 -0
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -0
- package/lib/commonjs/Competition/components/LeaderPicks.js +322 -0
- package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -0
- package/lib/commonjs/Competition/components/ManageSeasonForm.js +605 -0
- package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +1 -0
- package/lib/commonjs/Competition/components/MarketsCard.js +148 -0
- package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -0
- package/lib/commonjs/Competition/components/MatchMarketCard.js +199 -0
- package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -0
- package/lib/commonjs/Competition/components/NavOutPrompt.js +159 -0
- package/lib/commonjs/Competition/components/NavOutPrompt.js.map +1 -0
- package/lib/commonjs/Competition/components/SeasonInfoModal.js +400 -0
- package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +1 -0
- package/lib/commonjs/Competition/components/TeamEventCard.js +217 -0
- package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -0
- package/lib/commonjs/Competition/components/WagerPickForm.js +278 -0
- package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -0
- package/lib/commonjs/Competition/index.js +42 -0
- package/lib/commonjs/Competition/index.js.map +1 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/Jerseys.js +713 -0
- package/lib/commonjs/Components/Jerseys.js.map +1 -0
- package/lib/commonjs/Components/LinearDiagnal.js +1 -1
- package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
- package/lib/commonjs/Components/Switch.js +81 -0
- package/lib/commonjs/Components/Switch.js.map +1 -0
- package/lib/commonjs/Components/index.js +14 -0
- package/lib/commonjs/Components/index.js.map +1 -1
- package/lib/commonjs/Poll/api/index.js +277 -0
- package/lib/commonjs/Poll/api/index.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignPlay.js +553 -0
- package/lib/commonjs/Poll/components/CampaignPlay.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignProgressBar.js +118 -0
- package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignResult.js +382 -0
- package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignSelector.js +124 -0
- package/lib/commonjs/Poll/components/CampaignSelector.js.map +1 -0
- package/lib/commonjs/Poll/components/PollCampaignCard.js +66 -0
- package/lib/commonjs/Poll/components/PollCampaignCard.js.map +1 -0
- package/lib/commonjs/Poll/components/PollCard.js +480 -0
- package/lib/commonjs/Poll/components/PollCard.js.map +1 -0
- package/lib/commonjs/Poll/components/PollOptionCard.js +158 -0
- package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -0
- package/lib/commonjs/Poll/components/PollSelectCard.js +189 -0
- package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -0
- package/lib/commonjs/Poll/components/ResponseTimer.js +48 -0
- package/lib/commonjs/Poll/components/ResponseTimer.js.map +1 -0
- package/lib/commonjs/Poll/components/WidgetHeader.js +83 -0
- package/lib/commonjs/Poll/components/WidgetHeader.js.map +1 -0
- package/lib/commonjs/Poll/flashmarket/index.js +354 -0
- package/lib/commonjs/Poll/flashmarket/index.js.map +1 -0
- package/lib/commonjs/Poll/index.js +46 -0
- package/lib/commonjs/Poll/index.js.map +1 -0
- package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +3 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +5 -0
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/commonjs/ProfileManager/index.js +2 -0
- package/lib/commonjs/ProfileManager/index.js.map +1 -1
- package/lib/commonjs/Wallet/api/index.js +4 -1
- package/lib/commonjs/Wallet/api/index.js.map +1 -1
- package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +18 -0
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js +106 -0
- package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -0
- package/lib/module/Authenticator/Components/StrategyForm.js +239 -72
- package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/module/Authenticator/index.js +7 -4
- package/lib/module/Authenticator/index.js.map +1 -1
- package/lib/module/Checkout/api/index.js.map +1 -1
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/Competition/api/index.js +649 -0
- package/lib/module/Competition/api/index.js.map +1 -0
- package/lib/module/Competition/components/AthleteMarketCard.js +161 -0
- package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionCard.js +173 -0
- package/lib/module/Competition/components/CompetitionCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionInfoCard.js +257 -0
- package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionLeaderboard.js +272 -0
- package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionPlay.js +1260 -0
- package/lib/module/Competition/components/CompetitionPlay.js.map +1 -0
- package/lib/module/Competition/components/CompetitionSeasonCard.js +104 -0
- package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionSelector.js +113 -0
- package/lib/module/Competition/components/CompetitionSelector.js.map +1 -0
- package/lib/module/Competition/components/CompetitionTypeCard.js +371 -0
- package/lib/module/Competition/components/CompetitionTypeCard.js.map +1 -0
- package/lib/module/Competition/components/EnterCompetitionPrompt.js +228 -0
- package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -0
- package/lib/module/Competition/components/LeaderPicks.js +313 -0
- package/lib/module/Competition/components/LeaderPicks.js.map +1 -0
- package/lib/module/Competition/components/ManageSeasonForm.js +596 -0
- package/lib/module/Competition/components/ManageSeasonForm.js.map +1 -0
- package/lib/module/Competition/components/MarketsCard.js +139 -0
- package/lib/module/Competition/components/MarketsCard.js.map +1 -0
- package/lib/module/Competition/components/MatchMarketCard.js +192 -0
- package/lib/module/Competition/components/MatchMarketCard.js.map +1 -0
- package/lib/module/Competition/components/NavOutPrompt.js +152 -0
- package/lib/module/Competition/components/NavOutPrompt.js.map +1 -0
- package/lib/module/Competition/components/SeasonInfoModal.js +391 -0
- package/lib/module/Competition/components/SeasonInfoModal.js.map +1 -0
- package/lib/module/Competition/components/TeamEventCard.js +210 -0
- package/lib/module/Competition/components/TeamEventCard.js.map +1 -0
- package/lib/module/Competition/components/WagerPickForm.js +269 -0
- package/lib/module/Competition/components/WagerPickForm.js.map +1 -0
- package/lib/module/Competition/index.js +33 -0
- package/lib/module/Competition/index.js.map +1 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/Jerseys.js +705 -0
- package/lib/module/Components/Jerseys.js.map +1 -0
- package/lib/module/Components/LinearDiagnal.js +2 -3
- package/lib/module/Components/LinearDiagnal.js.map +1 -1
- package/lib/module/Components/Switch.js +74 -0
- package/lib/module/Components/Switch.js.map +1 -0
- package/lib/module/Components/index.js +3 -1
- package/lib/module/Components/index.js.map +1 -1
- package/lib/module/Poll/api/index.js +271 -0
- package/lib/module/Poll/api/index.js.map +1 -0
- package/lib/module/Poll/components/CampaignPlay.js +545 -0
- package/lib/module/Poll/components/CampaignPlay.js.map +1 -0
- package/lib/module/Poll/components/CampaignProgressBar.js +110 -0
- package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -0
- package/lib/module/Poll/components/CampaignResult.js +374 -0
- package/lib/module/Poll/components/CampaignResult.js.map +1 -0
- package/lib/module/Poll/components/CampaignSelector.js +115 -0
- package/lib/module/Poll/components/CampaignSelector.js.map +1 -0
- package/lib/module/Poll/components/PollCampaignCard.js +59 -0
- package/lib/module/Poll/components/PollCampaignCard.js.map +1 -0
- package/lib/module/Poll/components/PollCard.js +472 -0
- package/lib/module/Poll/components/PollCard.js.map +1 -0
- package/lib/module/Poll/components/PollOptionCard.js +149 -0
- package/lib/module/Poll/components/PollOptionCard.js.map +1 -0
- package/lib/module/Poll/components/PollSelectCard.js +182 -0
- package/lib/module/Poll/components/PollSelectCard.js.map +1 -0
- package/lib/module/Poll/components/ResponseTimer.js +39 -0
- package/lib/module/Poll/components/ResponseTimer.js.map +1 -0
- package/lib/module/Poll/components/WidgetHeader.js +76 -0
- package/lib/module/Poll/components/WidgetHeader.js.map +1 -0
- package/lib/module/Poll/flashmarket/index.js +345 -0
- package/lib/module/Poll/flashmarket/index.js.map +1 -0
- package/lib/module/Poll/index.js +37 -0
- package/lib/module/Poll/index.js.map +1 -0
- package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js +3 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWizard.js +5 -0
- package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/module/ProfileManager/index.js +2 -0
- package/lib/module/ProfileManager/index.js.map +1 -1
- package/lib/module/Wallet/api/index.js +4 -1
- package/lib/module/Wallet/api/index.js.map +1 -1
- package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressManager.js.map +1 -1
- package/lib/module/Wallet/components/DepositCard.js.map +1 -1
- package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/module/Wallet/components/MyBalance.js.map +1 -1
- package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts +1 -0
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/Components/AuthStrategyIdentifier.d.ts +11 -0
- package/lib/typescript/src/Authenticator/Components/AuthStrategyIdentifier.d.ts.map +1 -0
- package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts +4 -1
- package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/api/index.d.ts +2 -2
- package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/index.d.ts +2 -1
- package/lib/typescript/src/Authenticator/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/api/index.d.ts +1 -2
- package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/api/index.d.ts +128 -0
- package/lib/typescript/src/Competition/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts +19 -0
- package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionCard.d.ts +12 -0
- package/lib/typescript/src/Competition/components/CompetitionCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +16 -0
- package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +14 -0
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +20 -0
- package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts +10 -0
- package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts +11 -0
- package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts +14 -0
- package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +16 -0
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +22 -0
- package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +10 -0
- package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/MarketsCard.d.ts +15 -0
- package/lib/typescript/src/Competition/components/MarketsCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts +21 -0
- package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts +23 -0
- package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +14 -0
- package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/TeamEventCard.d.ts +17 -0
- package/lib/typescript/src/Competition/components/TeamEventCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +15 -0
- package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -0
- package/lib/typescript/src/Competition/index.d.ts +11 -0
- package/lib/typescript/src/Competition/index.d.ts.map +1 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/Jerseys.d.ts +16 -0
- package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -0
- package/lib/typescript/src/Components/LinearDiagnal.d.ts.map +1 -1
- package/lib/typescript/src/Components/Switch.d.ts +9 -0
- package/lib/typescript/src/Components/Switch.d.ts.map +1 -0
- package/lib/typescript/src/Components/index.d.ts +3 -1
- package/lib/typescript/src/Components/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/api/index.d.ts +65 -0
- package/lib/typescript/src/Poll/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +14 -0
- package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts +12 -0
- package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignResult.d.ts +13 -0
- package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignSelector.d.ts +9 -0
- package/lib/typescript/src/Poll/components/CampaignSelector.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts +10 -0
- package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollCard.d.ts +16 -0
- package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollOptionCard.d.ts +14 -0
- package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +16 -0
- package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/ResponseTimer.d.ts +9 -0
- package/lib/typescript/src/Poll/components/ResponseTimer.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/WidgetHeader.d.ts +13 -0
- package/lib/typescript/src/Poll/components/WidgetHeader.d.ts.map +1 -0
- package/lib/typescript/src/Poll/flashmarket/index.d.ts +10 -0
- package/lib/typescript/src/Poll/flashmarket/index.d.ts.map +1 -0
- package/lib/typescript/src/Poll/index.d.ts +13 -0
- package/lib/typescript/src/Poll/index.d.ts.map +1 -0
- package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +1 -2
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts +9 -2
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +1 -2
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +10 -3
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +1 -2
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/index.d.ts +9 -2
- package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/api/index.d.ts +2 -3
- package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts +1 -2
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ApiOverrides/index.ts +19 -0
- package/src/Authenticator/Components/AuthStrategyIdentifier.tsx +72 -0
- package/src/Authenticator/Components/StrategyForm.tsx +208 -53
- package/src/Authenticator/api/index.ts +2 -2
- package/src/Authenticator/api/types.d.ts +3 -26
- package/src/Authenticator/index.tsx +10 -4
- package/src/Checkout/api/index.tsx +1 -2
- package/src/Checkout/index.tsx +1 -2
- package/src/Competition/api/index.ts +568 -0
- package/src/Competition/components/AthleteMarketCard.tsx +116 -0
- package/src/Competition/components/CompetitionCard.tsx +82 -0
- package/src/Competition/components/CompetitionInfoCard.tsx +149 -0
- package/src/Competition/components/CompetitionLeaderboard.tsx +183 -0
- package/src/Competition/components/CompetitionPlay.tsx +936 -0
- package/src/Competition/components/CompetitionSeasonCard.tsx +48 -0
- package/src/Competition/components/CompetitionSelector.tsx +91 -0
- package/src/Competition/components/CompetitionTypeCard.tsx +211 -0
- package/src/Competition/components/EnterCompetitionPrompt.tsx +127 -0
- package/src/Competition/components/LeaderPicks.tsx +214 -0
- package/src/Competition/components/ManageSeasonForm.tsx +271 -0
- package/src/Competition/components/MarketsCard.tsx +108 -0
- package/src/Competition/components/MatchMarketCard.tsx +126 -0
- package/src/Competition/components/NavOutPrompt.tsx +87 -0
- package/src/Competition/components/SeasonInfoModal.tsx +212 -0
- package/src/Competition/components/TeamEventCard.tsx +136 -0
- package/src/Competition/components/WagerPickForm.tsx +114 -0
- package/src/Competition/index.tsx +36 -0
- package/src/Components/Icons.tsx +0 -2
- package/src/Components/Jerseys.tsx +268 -0
- package/src/Components/LinearDiagnal.tsx +2 -3
- package/src/Components/Switch.tsx +55 -0
- package/src/Components/index.tsx +5 -1
- package/src/Poll/api/index.ts +212 -0
- package/src/Poll/components/CampaignPlay.tsx +407 -0
- package/src/Poll/components/CampaignProgressBar.tsx +70 -0
- package/src/Poll/components/CampaignResult.tsx +180 -0
- package/src/Poll/components/CampaignSelector.tsx +96 -0
- package/src/Poll/components/PollCampaignCard.tsx +35 -0
- package/src/Poll/components/PollCard.tsx +335 -0
- package/src/Poll/components/PollOptionCard.tsx +110 -0
- package/src/Poll/components/PollSelectCard.tsx +106 -0
- package/src/Poll/components/ResponseTimer.tsx +37 -0
- package/src/Poll/components/WidgetHeader.tsx +46 -0
- package/src/Poll/flashmarket/index.tsx +231 -0
- package/src/Poll/index.tsx +45 -0
- package/src/ProfileManager/Components/BasicInfoManager.tsx +1 -1
- package/src/ProfileManager/Components/BasicStatus.tsx +1 -2
- package/src/ProfileManager/Components/CodeRedeem.tsx +10 -3
- package/src/ProfileManager/Components/DOBManager.tsx +1 -1
- package/src/ProfileManager/Components/EmailManager.tsx +1 -1
- package/src/ProfileManager/Components/PasswordManager.tsx +2 -1
- package/src/ProfileManager/Components/PhoneManager.tsx +1 -1
- package/src/ProfileManager/Components/ProfilePicManager.tsx +1 -1
- package/src/ProfileManager/Components/ProfileWelcome.tsx +1 -2
- package/src/ProfileManager/Components/ProfileWizard.tsx +14 -3
- package/src/ProfileManager/Components/SettingsManager.tsx +2 -2
- package/src/ProfileManager/Components/VouchCard.tsx +1 -2
- package/src/ProfileManager/api/index.ts +2 -2
- package/src/ProfileManager/api/types.d.ts +0 -35
- package/src/ProfileManager/index.tsx +11 -3
- package/src/Wallet/api/index.ts +6 -4
- package/src/Wallet/components/ACHAddCard.tsx +1 -2
- package/src/Wallet/components/AddressManager.tsx +1 -2
- package/src/Wallet/components/DepositCard.tsx +1 -2
- package/src/Wallet/components/FundAccountCard.tsx +1 -2
- package/src/Wallet/components/ManageAccountCard.tsx +1 -2
- package/src/Wallet/components/ManualACHAdd.tsx +1 -2
- package/src/Wallet/components/ManualCardAdd.tsx +1 -2
- package/src/Wallet/components/MyBalance.tsx +1 -2
- package/src/Wallet/components/WalletActionSelector.tsx +1 -2
- package/src/Wallet/components/WalletSettings.tsx +1 -2
- package/src/Wallet/components/WalletSetup.tsx +1 -2
- package/src/Wallet/components/WithdrawCard.tsx +1 -2
- package/src/Wallet/index.tsx +1 -2
- package/src/index.tsx +5 -2
- package/src/types.d.ts +486 -1
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react"
|
|
2
|
+
import { FlatList, Image, ScrollView, TouchableOpacity, View } from "react-native"
|
|
3
|
+
import TeamEventCard from "./TeamEventCard"
|
|
4
|
+
|
|
5
|
+
import AthleteMarketCard from "./AthleteMarketCard"
|
|
6
|
+
import MatchMarketCard from "./MatchMarketCard"
|
|
7
|
+
import type { AthleteProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionTypeProps, EventProps, MarketProps, MatchProps, PlayerPickProps, PublicPlayerProps, TeamProps, TournamentProps } from "../../types"
|
|
8
|
+
import { CompetitionResultApi, PlayerPicksApi } from "../api"
|
|
9
|
+
import Colors from "../../constants/colors"
|
|
10
|
+
import { Button, Text } from "../../Components"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
type LeaderPicksProps = {
|
|
14
|
+
competition:CompetitionProps,
|
|
15
|
+
markets:MarketProps[],
|
|
16
|
+
events:EventProps[],
|
|
17
|
+
matches:MatchProps[],
|
|
18
|
+
tournaments:TournamentProps[],
|
|
19
|
+
athletes:AthleteProps[],
|
|
20
|
+
teams:TeamProps[],
|
|
21
|
+
competition_type:CompetitionTypeProps,
|
|
22
|
+
competition_matches:CompetitionMatchProps[],
|
|
23
|
+
competition_match_markets:CompetitionMatchMarketProps[],
|
|
24
|
+
height: number,
|
|
25
|
+
leader:PublicPlayerProps,
|
|
26
|
+
onNext?:() => void
|
|
27
|
+
onPrevious?:() => void,
|
|
28
|
+
onClose:() => void
|
|
29
|
+
}
|
|
30
|
+
const LeaderPicks = ({ markets, events, matches, athletes, competition, competition_type, competition_matches, competition_match_markets, leader, height, onClose, onNext, onPrevious }:LeaderPicksProps) => {
|
|
31
|
+
const [ data, setData ] = useState<{
|
|
32
|
+
loading:boolean,
|
|
33
|
+
player_picks: PlayerPickProps[],
|
|
34
|
+
result?: CompetitionResultProps,
|
|
35
|
+
record?:CompetitionRecordProps
|
|
36
|
+
}>({
|
|
37
|
+
loading:false,
|
|
38
|
+
player_picks: []
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const { player_picks, result, record } = data;
|
|
42
|
+
|
|
43
|
+
let filtered_matches = competition_matches.filter(cm => player_picks.map(pp => pp.competition_match_id.toString()).includes(cm.competition_match_id))
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if(!competition || !leader){ return }
|
|
47
|
+
getPlayerPicksFromServer(competition.competition_id, leader.player_id, 0)
|
|
48
|
+
},[competition, leader.player_id])
|
|
49
|
+
|
|
50
|
+
const getPlayerPicksFromServer = async(competition_id:string, player_id:string, offset:number) => {
|
|
51
|
+
setData({ ...data, loading:true });
|
|
52
|
+
const pps = await PlayerPicksApi.getPlayerPicksByCompetition(competition_id, player_id, offset)
|
|
53
|
+
const { competition_records, competition_results } = await CompetitionResultApi.getResultsByCompetition(competition_id, 0, player_id)
|
|
54
|
+
setData({
|
|
55
|
+
...data,
|
|
56
|
+
loading:false,
|
|
57
|
+
player_picks: pps,
|
|
58
|
+
result: competition_results.find(cr => cr.player_id == player_id),
|
|
59
|
+
record: competition_records.find(cr => cr.player_id == player_id)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const renderEvents = (data:{ item:CompetitionMatchProps, index:number }) => {
|
|
64
|
+
const match_markets = competition_match_markets.filter(cmm => cmm.competition_match_id == data.item.competition_match_id);
|
|
65
|
+
const event_picks = player_picks.filter(pp => pp.competition_match_id == data.item.competition_match_id)
|
|
66
|
+
|
|
67
|
+
switch(data.item.event_type){
|
|
68
|
+
case 'team':
|
|
69
|
+
const event = events.find(e => e.event_id == data.item.event_id)
|
|
70
|
+
if(!event){ return <></> }
|
|
71
|
+
if(!data.item.side_type_override){
|
|
72
|
+
return (
|
|
73
|
+
<View style={{ margin:5, padding:10, borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, backgroundColor:Colors.shades.white }}>
|
|
74
|
+
<TeamEventCard
|
|
75
|
+
competition={competition}
|
|
76
|
+
competition_type={competition_type}
|
|
77
|
+
event={event}
|
|
78
|
+
markets={markets}
|
|
79
|
+
player_picks={event_picks}
|
|
80
|
+
mode='view'
|
|
81
|
+
onPick={() => console.log('')}
|
|
82
|
+
competition_match={data.item}
|
|
83
|
+
competition_match_markets={match_markets}
|
|
84
|
+
/>
|
|
85
|
+
</View>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
switch(data.item.side_type_override){
|
|
89
|
+
case 'athlete':
|
|
90
|
+
const athlete = athletes.find(a => a.athlete_id == data.item.side_id_override);
|
|
91
|
+
if(!athlete){ return <></> }
|
|
92
|
+
return (
|
|
93
|
+
<View style={{ margin:5, padding:10, borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, backgroundColor:Colors.shades.white }}>
|
|
94
|
+
<AthleteMarketCard
|
|
95
|
+
event={event}
|
|
96
|
+
athlete={athlete}
|
|
97
|
+
competition={competition}
|
|
98
|
+
competition_type={competition_type}
|
|
99
|
+
markets={markets}
|
|
100
|
+
competition_match={data.item}
|
|
101
|
+
mode='view'
|
|
102
|
+
orientation='horizontal'
|
|
103
|
+
onPick={() => console.log('')}
|
|
104
|
+
competition_match_markets={match_markets}
|
|
105
|
+
player_picks={event_picks}
|
|
106
|
+
/>
|
|
107
|
+
</View>
|
|
108
|
+
)
|
|
109
|
+
default: return <></>
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
case 'match':
|
|
113
|
+
const match = matches.find(m => m.match_id == data.item.event_id)
|
|
114
|
+
if(!match){ return <></> }
|
|
115
|
+
let home_athlete = athletes.find(a => a.athlete_id == match.participants[0])
|
|
116
|
+
let away_athlete = athletes.find(a => a.athlete_id == match.participants[1])
|
|
117
|
+
return (
|
|
118
|
+
<View style={{ margin:5, padding:10, borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, backgroundColor:Colors.shades.white }}>
|
|
119
|
+
<MatchMarketCard
|
|
120
|
+
match={match}
|
|
121
|
+
competition={competition}
|
|
122
|
+
competition_type={competition_type}
|
|
123
|
+
home_athlete={home_athlete}
|
|
124
|
+
away_athlete={away_athlete}
|
|
125
|
+
markets={markets}
|
|
126
|
+
competition_match={data.item}
|
|
127
|
+
mode='view'
|
|
128
|
+
onPick={() => console.log('')}
|
|
129
|
+
competition_match_markets={match_markets}
|
|
130
|
+
player_picks={event_picks}
|
|
131
|
+
/>
|
|
132
|
+
</View>
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
default: return <></>
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const cl = competition?.market_type == 'FOR_MONEY' ? '$' : 'E'
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<View style={{ flex:1, height, backgroundColor:Colors.shades.white }}>
|
|
146
|
+
{record && result ?
|
|
147
|
+
<View nativeID="leader_header">
|
|
148
|
+
<View style={{ backgroundColor:Colors.brand.midnight, padding:10, marginBottom:10, paddingTop:20 }}>
|
|
149
|
+
<Text size={18} color={Colors.shades.white} weight='bold' textAlign="center">Leaderboard Picks</Text>
|
|
150
|
+
<View style={{ flexDirection:'row', marginTop:15, marginBottom:10, alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
|
|
151
|
+
<View nativeID="place" style={{ padding:5 }}>
|
|
152
|
+
<Text size={12} color={Colors.brand.midnight} weight="bold">{result.place}</Text>
|
|
153
|
+
</View>
|
|
154
|
+
<View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
|
|
155
|
+
<Image
|
|
156
|
+
source={{ uri: leader.profile_pic }}
|
|
157
|
+
style={{ height:30, width:30, borderRadius:100 }}
|
|
158
|
+
resizeMode="cover"
|
|
159
|
+
/>
|
|
160
|
+
</View>
|
|
161
|
+
<View nativeID="details" style={{ flex:1 }}>
|
|
162
|
+
<Text size={12} color={Colors.brand.midnight} weight='semibold'>{leader.username}</Text>
|
|
163
|
+
{competition_type?.type == 'wager' ?
|
|
164
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{record.earnings.toFixed(2)} Earned ({record.remaining_stakes.toFixed(2)} at risk)</Text>
|
|
165
|
+
:
|
|
166
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{record.wins} - {record.losses} - {record.draws} ({record.remaining_picks} Remaining)</Text>
|
|
167
|
+
}
|
|
168
|
+
</View>
|
|
169
|
+
<View nativeID="winnings">
|
|
170
|
+
<Text size={12} color={Colors.brand.slate} weight='regular'>{cl}{result.winnings.toFixed(2)}</Text>
|
|
171
|
+
</View>
|
|
172
|
+
</View>
|
|
173
|
+
{onNext && onPrevious ?
|
|
174
|
+
<View nativeID="nav" style={{ flexDirection:'row', alignItems:'center', margin:10, marginBottom:0 }}>
|
|
175
|
+
<TouchableOpacity style={{ flex:1 }}>
|
|
176
|
+
<Text size={14} color={Colors.shades.white} weight='regular'>Previous</Text>
|
|
177
|
+
</TouchableOpacity>
|
|
178
|
+
<TouchableOpacity style={{ flex:1 }}>
|
|
179
|
+
<Text size={14} color={Colors.shades.white} weight='regular' textAlign="right">Next</Text>
|
|
180
|
+
</TouchableOpacity>
|
|
181
|
+
</View>
|
|
182
|
+
:<></>}
|
|
183
|
+
</View>
|
|
184
|
+
</View>
|
|
185
|
+
:<></>}
|
|
186
|
+
|
|
187
|
+
<ScrollView style={{flex:1, backgroundColor:Colors.shades.white}} nativeID="leader_picks">
|
|
188
|
+
<Text style={{ margin:10 }} color={Colors.brand.midnight} textAlign="center" weight='bold' size={18}>{leader.username} Picks</Text>
|
|
189
|
+
<Text style={{ margin:10 }} color={Colors.brand.slate} textAlign="center" weight='bold' size={14}>Locked picks will appear after event is live</Text>
|
|
190
|
+
<View nativeID="picks" style={{ marginTop:10 }}>
|
|
191
|
+
<FlatList
|
|
192
|
+
scrollEnabled
|
|
193
|
+
data={filtered_matches}
|
|
194
|
+
renderItem={renderEvents}
|
|
195
|
+
keyExtractor={(item) => item.competition_match_id.toString()}
|
|
196
|
+
/>
|
|
197
|
+
</View>
|
|
198
|
+
</ScrollView>
|
|
199
|
+
<View nativeID="action_row" style={{ padding:10 }}>
|
|
200
|
+
<Button
|
|
201
|
+
title="Close"
|
|
202
|
+
title_color={Colors.brand.electric}
|
|
203
|
+
borderWidth={1}
|
|
204
|
+
borderColor={Colors.brand.electric}
|
|
205
|
+
borderRadius={22}
|
|
206
|
+
title_size={14}
|
|
207
|
+
onPress={() => onClose()}
|
|
208
|
+
/>
|
|
209
|
+
</View>
|
|
210
|
+
</View>
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export default LeaderPicks
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { FlatList, Image, ScrollView, TextInput, TouchableOpacity, View } from "react-native"
|
|
2
|
+
import React, { useEffect, useState } from "react"
|
|
3
|
+
import type { CompetitionSeasonProps } from "../../types"
|
|
4
|
+
import { CompetitionHelpers, CompetitionSeasonApi } from "../api"
|
|
5
|
+
import { Button, Switch, Text } from "../../Components"
|
|
6
|
+
import Colors from "../../constants/colors"
|
|
7
|
+
import ImageUploader from "../../Components/ImageUploader"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
type ManageSeasonFormProps = {
|
|
11
|
+
competition_season?:CompetitionSeasonProps
|
|
12
|
+
width: number,
|
|
13
|
+
onComplete: (status:'done'|'cancel') => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ManageSeasonForm = ({ competition_season, width, onComplete }:ManageSeasonFormProps) => {
|
|
17
|
+
const [ loading, setLoading ] = useState(false);
|
|
18
|
+
const [ show_templates, setShowTemplates ] = useState(true);
|
|
19
|
+
const [ season_templates, setSeasonTemplates ] = useState<CompetitionSeasonProps[]>([]);
|
|
20
|
+
const [ draft_season, setDraftSeason ] = useState(CompetitionHelpers.getEmptyCompetitionSeason())
|
|
21
|
+
const [ payout_allocation_label, setPayoutAllocationLabel ] = useState('0')
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
loadTemplates()
|
|
25
|
+
if(!competition_season){ return }
|
|
26
|
+
setDraftSeason(competition_season);
|
|
27
|
+
setShowTemplates(false);
|
|
28
|
+
},[competition_season])
|
|
29
|
+
|
|
30
|
+
const loadTemplates = async() => {
|
|
31
|
+
let templates = await CompetitionSeasonApi.getCompetitionSeasonTemplates()
|
|
32
|
+
setSeasonTemplates(templates)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const handleSelectTemplate = (s:CompetitionSeasonProps) => {
|
|
36
|
+
setDraftSeason({ ...s, competition_season_id: '', season_name:'', season_description:'', following_season_id: s.competition_season_id })
|
|
37
|
+
setPayoutAllocationLabel((s.payout_allocation*100).toFixed())
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const handleChangeAllocation = (text:string) => {
|
|
41
|
+
let non_str_num = parseFloat(text)
|
|
42
|
+
if(isNaN(non_str_num)){ return }
|
|
43
|
+
if(text == ''){
|
|
44
|
+
setPayoutAllocationLabel('')
|
|
45
|
+
return setDraftSeason({ ...draft_season, payout_allocation: 0 })
|
|
46
|
+
}
|
|
47
|
+
let allocation = parseFloat(text)
|
|
48
|
+
setPayoutAllocationLabel(text)
|
|
49
|
+
setDraftSeason({ ...draft_season, payout_allocation: allocation / 100 })
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const handleSubmit = async() => {
|
|
53
|
+
if(!CompetitionHelpers.isSeasonValid(draft_season)){ return alert('Please complete all required firlst') }
|
|
54
|
+
setLoading(true);
|
|
55
|
+
await CompetitionSeasonApi.createCompetitionSeason(draft_season)
|
|
56
|
+
setLoading(false);
|
|
57
|
+
onComplete('done')
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const renderTemplates = (data: { item:CompetitionSeasonProps, index:number }) => {
|
|
61
|
+
const selected = draft_season.following_season_id == data.item.competition_season_id ? true : false
|
|
62
|
+
return (
|
|
63
|
+
<TouchableOpacity
|
|
64
|
+
onPress={() => handleSelectTemplate(data.item)}
|
|
65
|
+
style={{ flexDirection:'row', borderRadius:8, backgroundColor:selected?Colors.brand.electric:'transparent', alignItems:'center', margin:3, padding:5, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
|
|
66
|
+
<View>
|
|
67
|
+
<Image
|
|
68
|
+
source={{uri: data.item.image?.url}}
|
|
69
|
+
style={{ height:50, width:75 }}
|
|
70
|
+
resizeMode="cover"
|
|
71
|
+
/>
|
|
72
|
+
</View>
|
|
73
|
+
<View style={{ flex:1, marginLeft:5 }}>
|
|
74
|
+
<Text size={12} color={selected?Colors.shades.white:Colors.brand.midnight} weight='bold'>{data.item.season_name}</Text>
|
|
75
|
+
<Text size={12} color={selected?Colors.shades.white:Colors.brand.midnight} weight='regular'>{data.item.season_description}</Text>
|
|
76
|
+
</View>
|
|
77
|
+
|
|
78
|
+
</TouchableOpacity>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let valid = CompetitionHelpers.isSeasonValid(draft_season)
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<View style={{ flex:1, backgroundColor:Colors.shades.white, padding:10 }}>
|
|
86
|
+
<View nativeID="form_header" style={{ padding:10 }}>
|
|
87
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold' textAlign='center'>{competition_season ? draft_season.season_name : 'Create New Season'}</Text>
|
|
88
|
+
</View>
|
|
89
|
+
<ScrollView style={{ flex:1 }}>
|
|
90
|
+
<View nativeID="season_template">
|
|
91
|
+
<View nativeID="competition_details">
|
|
92
|
+
<View nativeID="details_header" style={{ padding:10, paddingBottom:0 }}>
|
|
93
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Season Template</Text>
|
|
94
|
+
<Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Select a template for this season or do it on your own</Text>
|
|
95
|
+
</View>
|
|
96
|
+
</View>
|
|
97
|
+
<View nativeID="template_options" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
|
|
98
|
+
<View nativeID="template" style={{ flexDirection:'row', alignItems:'flex-start' }}>
|
|
99
|
+
<View nativeID="description" style={{ flex:1, marginRight:5 }}>
|
|
100
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>Use a Template</Text>
|
|
101
|
+
{show_templates ?
|
|
102
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>All competitions will be auto-created with appropriate events and participants will be notified.</Text>
|
|
103
|
+
:
|
|
104
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>You (the admin) will be responsible for creating each competition under this season.</Text>
|
|
105
|
+
}
|
|
106
|
+
</View>
|
|
107
|
+
|
|
108
|
+
<Switch value={show_templates} switch_type='on_off' onChange={(value) => {
|
|
109
|
+
if(!value){
|
|
110
|
+
//Need to reset init season
|
|
111
|
+
setDraftSeason(CompetitionHelpers.getEmptyCompetitionSeason())
|
|
112
|
+
}
|
|
113
|
+
setShowTemplates(!show_templates)}
|
|
114
|
+
}/>
|
|
115
|
+
</View>
|
|
116
|
+
{show_templates ?
|
|
117
|
+
<View style={{ marginTop:10 }}>
|
|
118
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>Template Options</Text>
|
|
119
|
+
<View nativeID="template_options" style={{ marginTop:5, backgroundColor:Colors.shades.white, borderRadius:4, padding:10 }}>
|
|
120
|
+
<FlatList
|
|
121
|
+
data={season_templates}
|
|
122
|
+
renderItem={renderTemplates}
|
|
123
|
+
keyExtractor={(item) => item.competition_season_id.toString()}
|
|
124
|
+
/>
|
|
125
|
+
</View>
|
|
126
|
+
</View>
|
|
127
|
+
:<></>}
|
|
128
|
+
</View>
|
|
129
|
+
</View>
|
|
130
|
+
{!show_templates || (show_templates && draft_season.following_season_id) ?
|
|
131
|
+
<View nativeID="form_options">
|
|
132
|
+
<View nativeID="competition_details">
|
|
133
|
+
<View nativeID="details_header" style={{ padding:10, paddingBottom:0 }}>
|
|
134
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Season Details</Text>
|
|
135
|
+
<Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Name and describe this season</Text>
|
|
136
|
+
</View>
|
|
137
|
+
<View nativeID="details_input" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
|
|
138
|
+
<View nativeID="season_name">
|
|
139
|
+
<Text style={{ padding:10 }} size={14} color={Colors.brand.slate} weight='regular'>Name</Text>
|
|
140
|
+
<TextInput
|
|
141
|
+
style={{ borderRadius:4, backgroundColor:Colors.shades.white, padding:10, fontFamily:'barlow-regular', fontSize:14, color:Colors.brand.midnight }}
|
|
142
|
+
placeholder="Season Name..."
|
|
143
|
+
placeholderTextColor={Colors.brand.slate}
|
|
144
|
+
value={draft_season.season_name}
|
|
145
|
+
onChangeText={(text) => setDraftSeason({ ...draft_season, season_name: text })}
|
|
146
|
+
/>
|
|
147
|
+
</View>
|
|
148
|
+
<View nativeID="season_description">
|
|
149
|
+
<Text style={{ padding:10 }} size={14} color={Colors.brand.slate} weight='regular'>Description</Text>
|
|
150
|
+
<TextInput
|
|
151
|
+
style={{ borderRadius:4, backgroundColor:Colors.shades.white, padding:10, fontFamily:'barlow-regular', fontSize:14, color:Colors.brand.midnight }}
|
|
152
|
+
placeholder="Optional..."
|
|
153
|
+
placeholderTextColor={Colors.brand.slate}
|
|
154
|
+
value={draft_season.season_description}
|
|
155
|
+
onChangeText={(text) => setDraftSeason({ ...draft_season, season_description: text })}
|
|
156
|
+
/>
|
|
157
|
+
</View>
|
|
158
|
+
</View>
|
|
159
|
+
</View>
|
|
160
|
+
<View nativeID="competition_image">
|
|
161
|
+
<View nativeID="image_header" style={{ flexDirection:'row', alignItems:'center', padding:10, paddingBottom:0 }}>
|
|
162
|
+
<View style={{ flex:1 }}>
|
|
163
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Season Image</Text>
|
|
164
|
+
<Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Give an image to the season (2w X 1h)</Text>
|
|
165
|
+
</View>
|
|
166
|
+
<ImageUploader
|
|
167
|
+
public_id={`${Math.floor(Math.random() * (1000000 - 0 + 1) + 1)}_season_image`}
|
|
168
|
+
onFinishUpload={(obj) => setDraftSeason({ ...draft_season, image: { url: obj.secure_url, ...obj } })}
|
|
169
|
+
>
|
|
170
|
+
<Text size={14} color={Colors.brand.electric}>Edit Image</Text>
|
|
171
|
+
</ImageUploader>
|
|
172
|
+
</View>
|
|
173
|
+
<View nativeID="season_image" style={{ justifyContent:'center', alignItems:'center', margin:5 }}>
|
|
174
|
+
<Image
|
|
175
|
+
source={{ uri: draft_season?.image?.url }}
|
|
176
|
+
style={{ width:width*0.75, height: width*0.75/2 }}
|
|
177
|
+
resizeMode="cover"
|
|
178
|
+
/>
|
|
179
|
+
</View>
|
|
180
|
+
</View>
|
|
181
|
+
<View nativeID="season_options">
|
|
182
|
+
<View nativeID="options_header" style={{ flexDirection:'row', alignItems:'center', padding:10, paddingBottom:0 }}>
|
|
183
|
+
<View style={{ flex:1 }}>
|
|
184
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Season Configurations</Text>
|
|
185
|
+
<Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Determines how the competition will operate and payout</Text>
|
|
186
|
+
</View>
|
|
187
|
+
</View>
|
|
188
|
+
<View nativeID="options_input" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
|
|
189
|
+
<View nativeID="single_buy_in" style={{ flexDirection:'row', alignItems:'flex-start' }}>
|
|
190
|
+
<View nativeID="description" style={{ flex:1, marginRight:5 }}>
|
|
191
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>One Buy In</Text>
|
|
192
|
+
{draft_season.single_buy_in ?
|
|
193
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>Once a player has purchased a ticket, they will be automatically entered into any competition created under this season.</Text>
|
|
194
|
+
:
|
|
195
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>Players will be required to buy-in to each competition created under this season.</Text>
|
|
196
|
+
}
|
|
197
|
+
</View>
|
|
198
|
+
<Switch value={draft_season.single_buy_in} switch_type='on_off' onChange={() => setDraftSeason({ ...draft_season, single_buy_in: !draft_season.single_buy_in })}/>
|
|
199
|
+
</View>
|
|
200
|
+
<View nativeID="single_buy_in" style={{ flexDirection:'row', alignItems:'flex-start', marginTop:15 }}>
|
|
201
|
+
<View nativeID="description" style={{ flex:1, marginRight:5 }}>
|
|
202
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>Allow Late Buy In</Text>
|
|
203
|
+
{draft_season.allow_late_buy_in ?
|
|
204
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>A player can enter this season at any time (even if the first competition has completed)</Text>
|
|
205
|
+
:
|
|
206
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>A player must enter the first competition under the season to participate.</Text>
|
|
207
|
+
}
|
|
208
|
+
</View>
|
|
209
|
+
<Switch value={draft_season.allow_late_buy_in} switch_type='on_off' onChange={() => setDraftSeason({ ...draft_season, allow_late_buy_in: !draft_season.allow_late_buy_in })}/>
|
|
210
|
+
</View>
|
|
211
|
+
</View>
|
|
212
|
+
</View>
|
|
213
|
+
<View nativeID="season_payout_details">
|
|
214
|
+
<View nativeID="payout_header" style={{ flexDirection:'row', alignItems:'center', padding:10, paddingBottom:0 }}>
|
|
215
|
+
<View style={{ flex:1 }}>
|
|
216
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Season Payout</Text>
|
|
217
|
+
<Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>How would you like the funds in the season to payout?</Text>
|
|
218
|
+
</View>
|
|
219
|
+
</View>
|
|
220
|
+
<View nativeID="payout_input" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
|
|
221
|
+
<View nativeID="payout_allocation" style={{ flexDirection:'row', alignItems:'flex-start' }}>
|
|
222
|
+
<View nativeID="description" style={{ flex:1, marginRight:5 }}>
|
|
223
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>How much of the total pot will be paid out to the season vs each competition</Text>
|
|
224
|
+
</View>
|
|
225
|
+
<TextInput
|
|
226
|
+
value={payout_allocation_label}
|
|
227
|
+
onChangeText={(text) => handleChangeAllocation(text)}
|
|
228
|
+
style={{ padding:10, borderRadius:4, width: width * 0.2, backgroundColor:Colors.shades.white, textAlign:'center', color:Colors.brand.midnight, fontFamily:'barlow-bold' }}
|
|
229
|
+
|
|
230
|
+
/>
|
|
231
|
+
</View>
|
|
232
|
+
<View style={{ flexDirection:'row', marginTop:10 }}>
|
|
233
|
+
<View style={{ flex:1, padding:10, backgroundColor:Colors.shades.shade600, borderRadius:4, marginRight:5 }}>
|
|
234
|
+
<Text size={12} color={Colors.brand.midnight} textAlign="center">Each Competition</Text>
|
|
235
|
+
<Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='bold' textAlign="center">{((1 - draft_season.payout_allocation) * 100).toFixed()}%</Text>
|
|
236
|
+
</View>
|
|
237
|
+
<View style={{ flex:1, padding:10, backgroundColor:Colors.shades.shade600, borderRadius:4, marginLeft:5 }}>
|
|
238
|
+
<Text size={12} color={Colors.brand.midnight} textAlign="center">Season</Text>
|
|
239
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="center">{((draft_season.payout_allocation) * 100).toFixed()}%</Text>
|
|
240
|
+
</View>
|
|
241
|
+
</View>
|
|
242
|
+
</View>
|
|
243
|
+
</View>
|
|
244
|
+
</View>
|
|
245
|
+
:<></>}
|
|
246
|
+
</ScrollView>
|
|
247
|
+
<View nativeID="action_row" style={{ flexDirection:'row', padding:10 }}>
|
|
248
|
+
<Button
|
|
249
|
+
style={{ flex:1, marginRight:3 }}
|
|
250
|
+
title="Cancel"
|
|
251
|
+
onPress={() => onComplete('cancel')}
|
|
252
|
+
title_color={Colors.brand.electric}
|
|
253
|
+
borderWidth={1}
|
|
254
|
+
padding={15}
|
|
255
|
+
borderColor={Colors.brand.electric}
|
|
256
|
+
/>
|
|
257
|
+
<Button
|
|
258
|
+
disabled={!valid || loading}
|
|
259
|
+
style={{ flex:2, marginLeft:3, opacity:valid&&!loading?1:0.5 }}
|
|
260
|
+
title={draft_season.competition_season_id ? 'Edit Season' : 'Create Season'}
|
|
261
|
+
onPress={() => handleSubmit()}
|
|
262
|
+
title_color={Colors.shades.white}
|
|
263
|
+
padding={15}
|
|
264
|
+
backgroundColor={Colors.utility.success}
|
|
265
|
+
/>
|
|
266
|
+
</View>
|
|
267
|
+
</View>
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export default ManageSeasonForm
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import { ActivityIndicator, FlatList, TouchableOpacity, View } from "react-native"
|
|
3
|
+
import type { CompetitionMatchMarketProps, MarketProps, PlayerPickProps } from "../../types"
|
|
4
|
+
import Colors from "../../constants/colors"
|
|
5
|
+
import { Icons, Text } from "../../Components"
|
|
6
|
+
import { CompetitionHelpers } from "../api"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
type MarketsCardProps = {
|
|
10
|
+
competition_match_markets:CompetitionMatchMarketProps[]
|
|
11
|
+
markets:MarketProps[],
|
|
12
|
+
player_picks: PlayerPickProps[]
|
|
13
|
+
mode: 'view'|'play'
|
|
14
|
+
orientation?: 'vertical'|'horizontal'
|
|
15
|
+
disabled?:boolean;
|
|
16
|
+
locked?:boolean;
|
|
17
|
+
onMarketSelect:(cmm:CompetitionMatchMarketProps, player_pick?:PlayerPickProps) => void
|
|
18
|
+
}
|
|
19
|
+
const MarketsCard = ({ competition_match_markets, markets, orientation, onMarketSelect, player_picks, locked, disabled, mode }:MarketsCardProps) => {
|
|
20
|
+
const [ markets_width, setMarketsWidth ] = useState(0)
|
|
21
|
+
|
|
22
|
+
let unique_market_ids = [ ...new Set(competition_match_markets.map(cmm => cmm.market_id))]
|
|
23
|
+
const getPickColor = (player_pick:PlayerPickProps) => {
|
|
24
|
+
if(locked){ return Colors.shades.shade600 }
|
|
25
|
+
switch(player_pick.result_ind){
|
|
26
|
+
case 'win': return Colors.utility.success
|
|
27
|
+
case 'lose': return Colors.utility.error
|
|
28
|
+
case 'draw': return Colors.brand.slate
|
|
29
|
+
default: return Colors.highlights.highlight200
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const renderMarkets = (data:{item:string, index:number}) => {
|
|
34
|
+
const market = markets.find(m => m.market_id == data.item)
|
|
35
|
+
const match_markets = competition_match_markets.filter(cmm => cmm.market_id == data.item)
|
|
36
|
+
if(!market){ return <></> }
|
|
37
|
+
|
|
38
|
+
const market_width = orientation == "horizontal" ? markets_width : markets_width / unique_market_ids.length
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<View style={{ flex:1, flexDirection:orientation == 'horizontal'?'row':'column', width: market_width }}>
|
|
42
|
+
{orientation == 'horizontal' ?
|
|
43
|
+
<></>
|
|
44
|
+
:
|
|
45
|
+
<Text size={12} color={Colors.shades.black} weight='regular' textAlign="center">{market.type.toUpperCase()}</Text>
|
|
46
|
+
}
|
|
47
|
+
{match_markets.sort((a) => {
|
|
48
|
+
if(a.side == market.trade_side){ return 1 } else { return -1}
|
|
49
|
+
}).map(mm => {
|
|
50
|
+
const player_pick = player_picks.find(pp => pp.market_id == data.item && pp.side == mm.side)
|
|
51
|
+
return (
|
|
52
|
+
<TouchableOpacity
|
|
53
|
+
delayPressIn={0}
|
|
54
|
+
disabled={locked || mode == 'view' || disabled}
|
|
55
|
+
onPress={() => onMarketSelect(mm, player_pick)}
|
|
56
|
+
style={{
|
|
57
|
+
flex:1, marginTop:3, justifyContent:'center', padding:7.5,
|
|
58
|
+
backgroundColor: player_pick ? getPickColor(player_pick) : Colors.shades.shade600,
|
|
59
|
+
borderRadius:4,
|
|
60
|
+
margin:3,
|
|
61
|
+
opacity: disabled ? 0.5 : 1
|
|
62
|
+
}}>
|
|
63
|
+
{market.var_1_required ?
|
|
64
|
+
<Text size={12} color={player_pick&&!locked?Colors.shades.white:Colors.shades.black} textAlign="center">{mm.side=='over'?'O ':mm.side=='under'?'U ':''}{CompetitionHelpers.getVar1Label(mm.var_1, market)}</Text>
|
|
65
|
+
:market.show_side_option ?
|
|
66
|
+
<Text size={12} color={player_pick&&!locked?Colors.shades.white:Colors.shades.black} textAlign="center">{mm.side.toUpperCase()}</Text>
|
|
67
|
+
:<></>}
|
|
68
|
+
<Text size={12} color={player_pick&&!locked?Colors.shades.white:Colors.shades.black} textAlign="center" weight='bold'>{CompetitionHelpers.getOddsLabel(mm.odds)}</Text>
|
|
69
|
+
{locked ?
|
|
70
|
+
<View style={{ position:'absolute', backgroundColor:Colors.shades.shade600, borderRadius:4, top:0, bottom:0, right:0, left:0, justifyContent:'center', alignItems:'center' }}>
|
|
71
|
+
<Icons.LockClosedIcon size={14} color={Colors.shades.black} />
|
|
72
|
+
</View>
|
|
73
|
+
:<></>}
|
|
74
|
+
</TouchableOpacity>
|
|
75
|
+
)
|
|
76
|
+
})}
|
|
77
|
+
</View>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
return (
|
|
81
|
+
<View style={{ flex:1 }} onLayout={(ev) => {
|
|
82
|
+
const { width } = ev.nativeEvent.layout;
|
|
83
|
+
setMarketsWidth(width)
|
|
84
|
+
}}>
|
|
85
|
+
{markets_width > 0 ?
|
|
86
|
+
<View>
|
|
87
|
+
{unique_market_ids.length > 0 ?
|
|
88
|
+
<FlatList
|
|
89
|
+
horizontal
|
|
90
|
+
data={unique_market_ids}
|
|
91
|
+
renderItem={renderMarkets}
|
|
92
|
+
/>
|
|
93
|
+
:
|
|
94
|
+
<View style={{ height:100, justifyContent:'center', alignItems:'center' }}>
|
|
95
|
+
<Icons.LockClosedIcon color={Colors.brand.midnight} size={32}/>
|
|
96
|
+
</View>
|
|
97
|
+
}
|
|
98
|
+
</View>
|
|
99
|
+
:
|
|
100
|
+
<View style={{ height:100, justifyContent:'center', alignItems:'center' }}>
|
|
101
|
+
<ActivityIndicator size={'large'} color={Colors.brand.midnight}/>
|
|
102
|
+
</View>
|
|
103
|
+
}
|
|
104
|
+
</View>
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default MarketsCard
|