be-components 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ApiOverrides/index.js +18 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- 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 +240 -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/index.js +31 -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/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 +234 -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/index.js +22 -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/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.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 +61 -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/index.d.ts +7 -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/api/index.ts +2 -2
- package/src/Authenticator/api/types.d.ts +1 -25
- package/src/Authenticator/index.tsx +2 -1
- 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 +178 -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/index.tsx +25 -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 +483 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, TouchableOpacity, View } from "react-native"
|
|
3
|
+
import type { CompetitionProps, CompetitionResultTypeProps, CompetitionTypeProps } from "../../types";
|
|
4
|
+
import { CompetitionHelpers } from "../api";
|
|
5
|
+
import Colors from "../../constants/colors";
|
|
6
|
+
import { Icons, Text } from '../../Components';
|
|
7
|
+
import moment from 'moment-mini';
|
|
8
|
+
|
|
9
|
+
type CompetitionCardProps = {
|
|
10
|
+
competition:CompetitionProps,
|
|
11
|
+
competition_type:CompetitionTypeProps,
|
|
12
|
+
competition_result_type:CompetitionResultTypeProps,
|
|
13
|
+
backup_image_url?:string,
|
|
14
|
+
onSelect: (competition:CompetitionProps) => void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const CompetitionCard = ({ competition, competition_type, competition_result_type, onSelect, backup_image_url }: CompetitionCardProps) => {
|
|
18
|
+
|
|
19
|
+
if(!competition || !competition_type){ return<></> }
|
|
20
|
+
|
|
21
|
+
const comp_colors = CompetitionHelpers.getCompColors(competition_type.type)
|
|
22
|
+
const cl = competition.market_type == 'FOR_MONEY' ? '$' : 'E'
|
|
23
|
+
return (
|
|
24
|
+
<TouchableOpacity style={{ flex:1, borderRadius:8, borderWidth:1, borderColor:Colors.shades.shade600, flexShrink:0 }} onPress={() => onSelect(competition)}>
|
|
25
|
+
{competition.prize_override ?
|
|
26
|
+
<View nativeID="prize_details" style={{ padding:5, flexDirection:'row', alignItems:'center', borderTopRightRadius:8, borderTopLeftRadius:8, backgroundColor:Colors.incentive.gold }}>
|
|
27
|
+
{competition.prize_image ?
|
|
28
|
+
<View nativeID="prize_image" style={{ marginRight:15 }}>
|
|
29
|
+
<Image
|
|
30
|
+
source={{ uri: competition.prize_image.url }}
|
|
31
|
+
style={{ height:40, width:40, borderRadius:8 }}
|
|
32
|
+
resizeMode="center"
|
|
33
|
+
/>
|
|
34
|
+
</View>
|
|
35
|
+
:<></>}
|
|
36
|
+
<Text size={12} color={Colors.shades.white} weight="bold">{competition.prize_override}</Text>
|
|
37
|
+
</View>
|
|
38
|
+
:<></>}
|
|
39
|
+
<View nativeID="comp_info">
|
|
40
|
+
<View style={{flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
|
|
41
|
+
<View nativeID="comp_image" style={{ marginRight:5 }}>
|
|
42
|
+
<Image
|
|
43
|
+
style={{height:35, width:35, borderRadius:4}}
|
|
44
|
+
source={{ uri: competition.image?.url ?? backup_image_url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1649737982/be_logo_isfksg.webp' }}
|
|
45
|
+
/>
|
|
46
|
+
</View>
|
|
47
|
+
<View nativeID="comp_name_desc" style={{ flex:1, marginLeft:5 }}>
|
|
48
|
+
<Text size={12} color={Colors.brand.midnight} weight='semibold'>{competition.competition_name}</Text>
|
|
49
|
+
{competition.competition_description ?
|
|
50
|
+
<Text size={12} color={Colors.brand.midnight} weight='regular' style={{ marginTop:2 }}>{competition.competition_description}</Text>
|
|
51
|
+
:
|
|
52
|
+
<Text size={12} color={Colors.brand.midnight} weight='regular' style={{ marginTop:2 }}>Begins: {moment(competition.scheduled_datetime).format('MMM DD - hh:mm a')}</Text>
|
|
53
|
+
}
|
|
54
|
+
</View>
|
|
55
|
+
<Icons.ChevronIcon direction="right" size={10} color={Colors.brand.midnight}/>
|
|
56
|
+
</View>
|
|
57
|
+
<View nativeID="comp_amounts" style={{ flexDirection:'row', padding:10 }}>
|
|
58
|
+
<View style={{ flex:1, flexDirection:'row' }}>
|
|
59
|
+
<View style={{ backgroundColor:comp_colors.backgroundColor, borderWidth:1, borderColor:comp_colors.borderColor, borderRadius:8, padding:5 }}>
|
|
60
|
+
<Text size={10} color={comp_colors.borderColor} weight='semibold'>{competition.buy_in == 0?'FREE ENTRY':`${cl}${competition.buy_in}`}</Text>
|
|
61
|
+
</View>
|
|
62
|
+
{competition_type ?
|
|
63
|
+
<View style={{ marginLeft: 5, backgroundColor:comp_colors.backgroundColor, borderWidth:1, borderColor:comp_colors.borderColor, borderRadius:8, padding:5 }}>
|
|
64
|
+
<Text size={10} color={comp_colors.borderColor} weight='semibold'>{competition_type.type_label}</Text>
|
|
65
|
+
</View>
|
|
66
|
+
:<></>}
|
|
67
|
+
{competition_result_type ?
|
|
68
|
+
<View style={{ marginLeft: 5, backgroundColor:comp_colors.backgroundColor, borderWidth:1, borderColor:comp_colors.borderColor, borderRadius:8, padding:5 }}>
|
|
69
|
+
<Text size={10} color={comp_colors.borderColor} weight='semibold'>{competition_result_type.label}</Text>
|
|
70
|
+
</View>
|
|
71
|
+
:<></>}
|
|
72
|
+
</View>
|
|
73
|
+
<View style={{ borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, padding:5, marginLeft:5 }}>
|
|
74
|
+
<Text size={10} color={Colors.brand.midnight} weight='semibold'>Available Tickets: {competition.available_tickets - competition.tickets_sold}</Text>
|
|
75
|
+
</View>
|
|
76
|
+
</View>
|
|
77
|
+
</View>
|
|
78
|
+
</TouchableOpacity>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default CompetitionCard
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, TouchableOpacity, View } from "react-native"
|
|
3
|
+
import type { CompetitionProps, CompetitionTypeProps, MyPlayerProps } from "../../types"
|
|
4
|
+
import moment from 'moment-mini';
|
|
5
|
+
import { Button, Icons, Text } from '../../Components';
|
|
6
|
+
import { CompetitionApi, CompetitionHelpers } from '../api';
|
|
7
|
+
import Colors from '../../constants/colors';
|
|
8
|
+
import { BELinkApi } from '../../Observer';
|
|
9
|
+
|
|
10
|
+
type CompetitionInfoCardProps = {
|
|
11
|
+
competition:CompetitionProps,
|
|
12
|
+
competition_type:CompetitionTypeProps,
|
|
13
|
+
onViewEvents: () => void,
|
|
14
|
+
player?:MyPlayerProps,
|
|
15
|
+
onEnter: (competition_id:string) => void,
|
|
16
|
+
onLeave:() => void,
|
|
17
|
+
onViewPrize?:() => void,
|
|
18
|
+
onViewRules: () => void,
|
|
19
|
+
can_leave?:boolean
|
|
20
|
+
}
|
|
21
|
+
const CompetitionInfoCard = ({ player, competition, competition_type, onViewEvents, onEnter, onLeave, can_leave, onViewRules }:CompetitionInfoCardProps) => {
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
const handleShare = async() => {
|
|
26
|
+
let redirect_url = `https://app.bettoredge.com/competition/play/${competition.competition_id}`
|
|
27
|
+
if(player){
|
|
28
|
+
const { player_referral } = await CompetitionApi.getMyReferralCode()
|
|
29
|
+
redirect_url += `?refer=${player_referral.referral_code}`
|
|
30
|
+
}
|
|
31
|
+
const { url } = await BELinkApi.generateShortLink({
|
|
32
|
+
generator:'player',
|
|
33
|
+
link_type: 'user_generated_link',
|
|
34
|
+
link_sub_type:'competition_link',
|
|
35
|
+
type_id: competition.competition_id,
|
|
36
|
+
status: 'active',
|
|
37
|
+
redirect_url
|
|
38
|
+
})
|
|
39
|
+
BELinkApi.share(competition.competition_name, undefined, url)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const can_enter = moment().isBefore(moment(competition.scheduled_datetime))
|
|
44
|
+
const cl = competition.market_type == 'FOR_MONEY' ? '$' : 'E'
|
|
45
|
+
|
|
46
|
+
let potential_winnings = competition.ticket_revenue
|
|
47
|
+
if(competition.promo_payout){
|
|
48
|
+
potential_winnings += competition.promo_payout
|
|
49
|
+
}
|
|
50
|
+
if(competition.guaranteed_payout){
|
|
51
|
+
if(potential_winnings < competition.guaranteed_payout){ potential_winnings = competition.guaranteed_payout }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<View>
|
|
56
|
+
<View nativeID="competition_info">
|
|
57
|
+
<View style={{ padding:10 }}>
|
|
58
|
+
<Text size={16} color={Colors.shades.white} weight='bold' textAlign="center">{competition.competition_name}</Text>
|
|
59
|
+
{competition_type ?
|
|
60
|
+
<View style={{ flexDirection:'row', justifyContent:'center', padding:10}}>
|
|
61
|
+
|
|
62
|
+
<View style={{ padding:10, marginRight:4, justifyContent:'center', backgroundColor: CompetitionHelpers.getCompTypeColor(competition_type), borderRadius:4 }}>
|
|
63
|
+
<Text size={12} color={Colors.shades.white} weight='semibold'>{competition_type.type_label}</Text>
|
|
64
|
+
</View>
|
|
65
|
+
<View style={{ flexDirection:'row', alignItems:'center', padding:10, marginLeft:4, backgroundColor: Colors.shades.white, borderRadius:4 }}>
|
|
66
|
+
<Text style={{ marginRight:5 }} size={12} color={Colors.brand.midnight} weight='semibold'>{competition.invite_only?'Private':'Public'}</Text>
|
|
67
|
+
{competition.invite_only ?
|
|
68
|
+
<Icons.EyeOffIcon color={Colors.brand.midnight} size={14}/>
|
|
69
|
+
:
|
|
70
|
+
<Icons.EyeOnIcon color={Colors.brand.midnight} size={14}/>
|
|
71
|
+
}
|
|
72
|
+
</View>
|
|
73
|
+
<TouchableOpacity
|
|
74
|
+
style={{ flexDirection:'row', alignItems:'center', padding:10, marginLeft:8, backgroundColor: Colors.incentive.gold, borderRadius:4 }}
|
|
75
|
+
onPress={() => onViewRules ? onViewRules(): console.log('')}>
|
|
76
|
+
{competition.prize_image ?
|
|
77
|
+
<Image
|
|
78
|
+
source={{ uri: competition.prize_image.url }}
|
|
79
|
+
style={{ height:20, width:20, marginRight:10 }}
|
|
80
|
+
resizeMode="center"
|
|
81
|
+
/>
|
|
82
|
+
:<></>}
|
|
83
|
+
<Text size={12} color={Colors.shades.white} weight='semibold'>VIEW RULES</Text>
|
|
84
|
+
</TouchableOpacity>
|
|
85
|
+
</View>
|
|
86
|
+
:<></>}
|
|
87
|
+
<View style={{ flexDirection:'row', padding:10, justifyContent:'center' }}>
|
|
88
|
+
<View style={{ padding:10, borderRightWidth:1, borderColor:Colors.shades.shade600 }}>
|
|
89
|
+
<Text color={Colors.shades.white} size={16} weight='bold' textAlign="center">{cl}{potential_winnings.toFixed(2)}</Text>
|
|
90
|
+
<Text style={{ marginTop:3 }} color={Colors.shades.white} size={12} textAlign="center">POT</Text>
|
|
91
|
+
</View>
|
|
92
|
+
<View style={{ padding:10, borderRightWidth:1, borderColor:Colors.shades.shade600 }}>
|
|
93
|
+
<Text color={Colors.shades.white} size={16} weight='bold' textAlign="center">{competition.tickets_sold} / {competition.available_tickets}</Text>
|
|
94
|
+
<Text style={{ marginTop:3 }} color={Colors.shades.white} size={12} textAlign="center">ENTRIES</Text>
|
|
95
|
+
</View>
|
|
96
|
+
{competition_type?.type == 'pick' ?
|
|
97
|
+
<View style={{ padding:10 }}>
|
|
98
|
+
<Text color={Colors.shades.white} size={16} weight='bold' textAlign="center">{competition.max_pick_count}</Text>
|
|
99
|
+
<Text style={{ marginTop:3 }} color={Colors.shades.white} size={12} textAlign="center">PICKS</Text>
|
|
100
|
+
</View>
|
|
101
|
+
:competition_type?.type == 'wager' ?
|
|
102
|
+
<View style={{ padding:10 }}>
|
|
103
|
+
<Text color={Colors.shades.white} size={16} weight='bold' textAlign="center">{competition.initial_balance}</Text>
|
|
104
|
+
<Text style={{ marginTop:3 }} color={Colors.shades.white} size={12} textAlign="center">INIT. BALANCE</Text>
|
|
105
|
+
</View>
|
|
106
|
+
:<></>}
|
|
107
|
+
</View>
|
|
108
|
+
</View>
|
|
109
|
+
</View>
|
|
110
|
+
<View nativeID="competition_actions" style={{ flexDirection:'row', padding:10 }}>
|
|
111
|
+
<TouchableOpacity
|
|
112
|
+
style={{ padding:10, borderRadius:22, borderWidth:1, borderColor:Colors.shades.white, marginRight:10, justifyContent:'center', alignItems:'center' }}
|
|
113
|
+
onPress={() => handleShare()}>
|
|
114
|
+
<Icons.ShareIcon size={14} color={Colors.shades.white}/>
|
|
115
|
+
</TouchableOpacity>
|
|
116
|
+
<Button
|
|
117
|
+
title={competition.entered?can_leave?'Leave':'My Picks':'Preview Events'}
|
|
118
|
+
padding={10}
|
|
119
|
+
style={{ flex:1, marginRight:3 }}
|
|
120
|
+
title_color={can_leave?Colors.utility.error:Colors.shades.white}
|
|
121
|
+
onPress={() => {
|
|
122
|
+
if(can_leave && onLeave){ return onLeave() }
|
|
123
|
+
return onViewEvents()
|
|
124
|
+
}}
|
|
125
|
+
borderRadius={22}
|
|
126
|
+
borderWidth={1}
|
|
127
|
+
backgroundColor="transparent"
|
|
128
|
+
borderColor={can_leave?Colors.utility.error:Colors.shades.white}
|
|
129
|
+
/>
|
|
130
|
+
<Button
|
|
131
|
+
title={competition.entered || !can_enter ? 'In Progress' : 'Enter Competition'}
|
|
132
|
+
padding={10}
|
|
133
|
+
disabled={competition.entered || !can_enter}
|
|
134
|
+
style={{ flex:1, marginLeft:3 }}
|
|
135
|
+
title_color={Colors.shades.white}
|
|
136
|
+
onPress={() => {
|
|
137
|
+
if(competition.entered){ return }
|
|
138
|
+
return onEnter(competition.competition_id)
|
|
139
|
+
}}
|
|
140
|
+
borderRadius={22}
|
|
141
|
+
backgroundColor={ competition.entered ? Colors.accents.accent100 : Colors.utility.success}
|
|
142
|
+
borderWidth={1}
|
|
143
|
+
/>
|
|
144
|
+
</View>
|
|
145
|
+
</View>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export default CompetitionInfoCard
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react"
|
|
2
|
+
import { FlatList, Image, ScrollView, TouchableOpacity, View, ActivityIndicator } from "react-native"
|
|
3
|
+
import type { CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionTypeProps, PublicPlayerProps } from "../../types"
|
|
4
|
+
import { CompetitionApi, CompetitionResultApi } from "../api"
|
|
5
|
+
import { Button, Icons, Text } from "../../Components"
|
|
6
|
+
import Colors from "../../constants/colors"
|
|
7
|
+
|
|
8
|
+
type CompetitionLeaderboardProps = {
|
|
9
|
+
competition:CompetitionProps,
|
|
10
|
+
competition_type:CompetitionTypeProps,
|
|
11
|
+
viewer_id?:string,
|
|
12
|
+
height: number,
|
|
13
|
+
view_mode: 'short'|'full',
|
|
14
|
+
onSeeFull: () => void,
|
|
15
|
+
onLeaderSelect:(player:PublicPlayerProps) => void
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_id, view_mode, onSeeFull, onLeaderSelect }:CompetitionLeaderboardProps) => {
|
|
19
|
+
|
|
20
|
+
const [ data, setData ] = useState<{
|
|
21
|
+
loading:boolean,
|
|
22
|
+
competition_results:CompetitionResultProps[],
|
|
23
|
+
competition_records:CompetitionRecordProps[],
|
|
24
|
+
players:PublicPlayerProps[],
|
|
25
|
+
offset:number
|
|
26
|
+
}>({
|
|
27
|
+
loading:false,
|
|
28
|
+
competition_results:[],
|
|
29
|
+
competition_records:[],
|
|
30
|
+
players:[],
|
|
31
|
+
offset:0
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const { loading, competition_results, competition_records, players } = data
|
|
35
|
+
|
|
36
|
+
let results = [ ...competition_results ];
|
|
37
|
+
|
|
38
|
+
if(view_mode == 'short'){ results = results.filter((r,i) => r ? i < 3 : i < 3) }
|
|
39
|
+
|
|
40
|
+
let viewer = players.find(p => p.player_id == viewer_id);
|
|
41
|
+
let viewer_result = competition_results.find(r => r.player_id == viewer_id);
|
|
42
|
+
let viewer_record = competition_records.find(r => r.player_id == viewer_id);
|
|
43
|
+
|
|
44
|
+
const cl = competition?.market_type == 'FOR_MONEY' ? '$' : 'E'
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if(!competition){ return }
|
|
48
|
+
getLeaderboardFromServer(competition.competition_id, 0)
|
|
49
|
+
},[competition])
|
|
50
|
+
|
|
51
|
+
const getLeaderboardFromServer = async(competition_id:string, offset:number) => {
|
|
52
|
+
setData({ ...data, loading:true })
|
|
53
|
+
const result_response = await CompetitionResultApi.getResultsByCompetition(competition_id, offset)
|
|
54
|
+
let player_ids = result_response.competition_results.map(cr => cr.player_id)
|
|
55
|
+
let players:PublicPlayerProps[] = []
|
|
56
|
+
if(player_ids.length > 0){ players = await CompetitionApi.getPlayersByPlayerIds(player_ids) }
|
|
57
|
+
setData({
|
|
58
|
+
...data,
|
|
59
|
+
players,
|
|
60
|
+
competition_records: result_response.competition_records,
|
|
61
|
+
competition_results: result_response.competition_results,
|
|
62
|
+
offset,
|
|
63
|
+
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const renderResults = (data: {item:CompetitionResultProps, index:number}) => {
|
|
68
|
+
let player:PublicPlayerProps | undefined = players.find(p => p.player_id == data.item.player_id)
|
|
69
|
+
let record = competition_records.find(r => r.player_id == data.item.player_id)
|
|
70
|
+
if(!player || !record){ return <></> }
|
|
71
|
+
//let roi = 0
|
|
72
|
+
//if(record.completed_stakes > 0){
|
|
73
|
+
// roi = record.earnings / record.completed_stakes
|
|
74
|
+
//}
|
|
75
|
+
const is_pacer = competition.pacer_id == data.item.player_id ? true : false
|
|
76
|
+
return (
|
|
77
|
+
<TouchableOpacity
|
|
78
|
+
onPress={() => onLeaderSelect(player)}
|
|
79
|
+
style={{ flexDirection:'row', margin:5, alignItems:'center', borderRadius:22, backgroundColor:is_pacer?Colors.highlights.highlight400Faded:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
|
|
80
|
+
{is_pacer ?
|
|
81
|
+
<View nativeID="pacer" style={{}}>
|
|
82
|
+
<Icons.PacerCarIcon size={28}/>
|
|
83
|
+
</View>
|
|
84
|
+
:
|
|
85
|
+
<View nativeID="place" style={{ padding:5 }}>
|
|
86
|
+
<Text size={12} color={Colors.brand.midnight} weight="bold">{data.item.place}</Text>
|
|
87
|
+
</View>
|
|
88
|
+
}
|
|
89
|
+
<View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
|
|
90
|
+
<Image
|
|
91
|
+
source={{ uri: player.profile_pic }}
|
|
92
|
+
style={{ height:30, width:30, borderRadius:100 }}
|
|
93
|
+
resizeMode="cover"
|
|
94
|
+
/>
|
|
95
|
+
</View>
|
|
96
|
+
<View nativeID="details" style={{ flex:1 }}>
|
|
97
|
+
<Text size={12} color={Colors.brand.midnight} weight='semibold'>{player.username}</Text>
|
|
98
|
+
{competition_type?.type == 'wager' ?
|
|
99
|
+
<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>
|
|
100
|
+
:
|
|
101
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{record.wins} - {record.losses} - {record.draws} ({record.remaining_picks} Remaining)</Text>
|
|
102
|
+
}
|
|
103
|
+
</View>
|
|
104
|
+
<View nativeID="winnings">
|
|
105
|
+
<Text size={12} color={Colors.brand.slate} weight='regular'>{cl}{data.item.winnings.toFixed(2)}</Text>
|
|
106
|
+
</View>
|
|
107
|
+
</TouchableOpacity>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
return (
|
|
111
|
+
<View style={{ flex:1, height, backgroundColor:Colors.shades.shade100 }}>
|
|
112
|
+
{view_mode == 'full' && viewer_record && viewer_result && viewer ?
|
|
113
|
+
<View>
|
|
114
|
+
{competition ?
|
|
115
|
+
<Text style={{ padding:20 }} size={18} color={Colors.brand.midnight} weight='bold' textAlign="center">{competition.competition_name}</Text>
|
|
116
|
+
:<></>}
|
|
117
|
+
<View style={{ backgroundColor:Colors.brand.midnight, padding:10, marginBottom:10 }}>
|
|
118
|
+
<Text size={18} color={Colors.shades.white} weight='bold' textAlign="center">Your Position</Text>
|
|
119
|
+
<TouchableOpacity style={{ flexDirection:'row', marginTop:15, marginBottom:10, alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
|
|
120
|
+
<View nativeID="place" style={{ padding:5 }}>
|
|
121
|
+
<Text size={12} color={Colors.brand.midnight} weight="bold">{viewer_result.place}</Text>
|
|
122
|
+
</View>
|
|
123
|
+
<View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
|
|
124
|
+
<Image
|
|
125
|
+
source={{ uri: viewer.profile_pic }}
|
|
126
|
+
style={{ height:30, width:30, borderRadius:100 }}
|
|
127
|
+
resizeMode="cover"
|
|
128
|
+
/>
|
|
129
|
+
</View>
|
|
130
|
+
<View nativeID="details" style={{ flex:1 }}>
|
|
131
|
+
<Text size={12} color={Colors.brand.midnight} weight='semibold'>{viewer.username}</Text>
|
|
132
|
+
{competition_type?.type == 'wager' ?
|
|
133
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{viewer_record.earnings.toFixed(2)} Earned ({viewer_record.remaining_stakes.toFixed(2)} at risk)</Text>
|
|
134
|
+
:
|
|
135
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{viewer_record.wins} - {viewer_record.losses} - {viewer_record.draws} ({viewer_record.remaining_picks} Remaining)</Text>
|
|
136
|
+
}
|
|
137
|
+
</View>
|
|
138
|
+
<View nativeID="winnings">
|
|
139
|
+
<Text size={12} color={Colors.brand.slate} weight='regular'>{cl}{viewer_result.winnings.toFixed(2)}</Text>
|
|
140
|
+
</View>
|
|
141
|
+
</TouchableOpacity>
|
|
142
|
+
</View>
|
|
143
|
+
</View>
|
|
144
|
+
:<></>}
|
|
145
|
+
<ScrollView>
|
|
146
|
+
{loading ?
|
|
147
|
+
<ActivityIndicator style={{ alignSelf:'center', padding:10 }} size='large' color={Colors.brand.midnight} />
|
|
148
|
+
:<></>}
|
|
149
|
+
<FlatList
|
|
150
|
+
data={results}
|
|
151
|
+
renderItem={renderResults}
|
|
152
|
+
keyExtractor={(item, index) => item.competition_result_id ? item.competition_result_id.toString() : index.toString()}
|
|
153
|
+
/>
|
|
154
|
+
|
|
155
|
+
</ScrollView>
|
|
156
|
+
{view_mode == 'short' ?
|
|
157
|
+
<Button
|
|
158
|
+
style={{ backgroundColor:undefined }}
|
|
159
|
+
title='See Full Leaderboard'
|
|
160
|
+
title_color={Colors.brand.electric}
|
|
161
|
+
title_size={14}
|
|
162
|
+
title_weight="regular"
|
|
163
|
+
onPress={() => onSeeFull()}
|
|
164
|
+
/>
|
|
165
|
+
:
|
|
166
|
+
<Button
|
|
167
|
+
style={{ margin:10 }}
|
|
168
|
+
title='Close'
|
|
169
|
+
title_color={Colors.brand.electric}
|
|
170
|
+
borderWidth={1}
|
|
171
|
+
borderRadius={22}
|
|
172
|
+
padding={15}
|
|
173
|
+
borderColor={Colors.brand.electric}
|
|
174
|
+
title_size={14}
|
|
175
|
+
title_weight="regular"
|
|
176
|
+
onPress={() => onSeeFull()}
|
|
177
|
+
/>
|
|
178
|
+
}
|
|
179
|
+
</View>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default CompetitionLeaderboard
|