be-components 7.4.8 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ApiOverrides/index.js +4 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/BetRouter/api/index.js +884 -0
- package/lib/commonjs/BetRouter/api/index.js.map +1 -0
- package/lib/commonjs/BetRouter/api/types.js +2 -0
- package/lib/commonjs/BetRouter/api/types.js.map +1 -0
- package/lib/commonjs/BetRouter/components/AccountManager.js +592 -0
- package/lib/commonjs/BetRouter/components/AccountManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/AdminPortal.js +51 -0
- package/lib/commonjs/BetRouter/components/AdminPortal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunities.js +550 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js +320 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js.map +1 -0
- package/lib/commonjs/BetRouter/components/ContestLiquidity.js +666 -0
- package/lib/commonjs/BetRouter/components/ContestLiquidity.js.map +1 -0
- package/lib/commonjs/BetRouter/components/ContestSelector.js +193 -0
- package/lib/commonjs/BetRouter/components/ContestSelector.js.map +1 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.js +332 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js +545 -0
- package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js +489 -0
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js.map +1 -0
- package/lib/commonjs/BetRouter/components/PartnerCredentials.js +229 -0
- package/lib/commonjs/BetRouter/components/PartnerCredentials.js.map +1 -0
- package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js +262 -0
- package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/AutoFillView.js +380 -0
- package/lib/commonjs/BetRouter/components/admin/AutoFillView.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/ConfigManager.js +814 -0
- package/lib/commonjs/BetRouter/components/admin/ConfigManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/JobManager.js +895 -0
- package/lib/commonjs/BetRouter/components/admin/JobManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueContests.js +2844 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueContests.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js +378 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js +795 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
- package/lib/commonjs/BetRouter/index.js +411 -0
- package/lib/commonjs/BetRouter/index.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js +312 -0
- package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/DesktopLayout.js +271 -0
- package/lib/commonjs/BetRouter/layouts/DesktopLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js +435 -0
- package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/MobileLayout.js +293 -0
- package/lib/commonjs/BetRouter/layouts/MobileLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/lib/commonjs/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/lib/commonjs/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/lib/commonjs/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/lib/commonjs/BetRouter/types/README.md +249 -0
- package/lib/commonjs/BetRouter/types/accounts.js +2 -0
- package/lib/commonjs/BetRouter/types/accounts.js.map +1 -0
- package/lib/commonjs/BetRouter/types/api-contracts.js +776 -0
- package/lib/commonjs/BetRouter/types/api-contracts.js.map +1 -0
- package/lib/commonjs/BetRouter/types/config.js +2 -0
- package/lib/commonjs/BetRouter/types/config.js.map +1 -0
- package/lib/commonjs/BetRouter/types/contests.js +2 -0
- package/lib/commonjs/BetRouter/types/contests.js.map +1 -0
- package/lib/commonjs/BetRouter/types/credentials.js +90 -0
- package/lib/commonjs/BetRouter/types/credentials.js.map +1 -0
- package/lib/commonjs/BetRouter/types/index.js +149 -0
- package/lib/commonjs/BetRouter/types/index.js.map +1 -0
- package/lib/commonjs/BetRouter/types/jobs.js +2 -0
- package/lib/commonjs/BetRouter/types/jobs.js.map +1 -0
- package/lib/commonjs/BetRouter/types/leagues.js +2 -0
- package/lib/commonjs/BetRouter/types/leagues.js.map +1 -0
- package/lib/commonjs/BetRouter/types/liquidity.js +2 -0
- package/lib/commonjs/BetRouter/types/liquidity.js.map +1 -0
- package/lib/commonjs/BetRouter/types/markets.js +2 -0
- package/lib/commonjs/BetRouter/types/markets.js.map +1 -0
- package/lib/commonjs/BetRouter/types/opportunities.js +6 -0
- package/lib/commonjs/BetRouter/types/opportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/types/orders.js +2 -0
- package/lib/commonjs/BetRouter/types/orders.js.map +1 -0
- package/lib/commonjs/BetRouter/types/participants.js +2 -0
- package/lib/commonjs/BetRouter/types/participants.js.map +1 -0
- package/lib/commonjs/BetRouter/types/partners.js +2 -0
- package/lib/commonjs/BetRouter/types/partners.js.map +1 -0
- package/lib/commonjs/Charts/README.md +310 -0
- package/lib/commonjs/Charts/adapters/TradeChartAdapter.js +406 -0
- package/lib/commonjs/Charts/adapters/TradeChartAdapter.js.map +1 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js +285 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js +504 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js.map +1 -0
- package/lib/commonjs/Charts/index.js +126 -0
- package/lib/commonjs/Charts/index.js.map +1 -0
- package/lib/commonjs/Charts/themes/chartTheme.js +141 -0
- package/lib/commonjs/Charts/themes/chartTheme.js.map +1 -0
- package/lib/commonjs/Charts/types.js +2 -0
- package/lib/commonjs/Charts/types.js.map +1 -0
- package/lib/commonjs/Charts/utils/formatters.js +194 -0
- package/lib/commonjs/Charts/utils/formatters.js.map +1 -0
- package/lib/commonjs/Components/Dropdown.js +5 -3
- package/lib/commonjs/Components/Dropdown.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +24 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/index.js +34 -0
- package/lib/commonjs/Components/index.js.map +1 -1
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js +16 -0
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +4 -0
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/BetRouter/api/index.js +873 -0
- package/lib/module/BetRouter/api/index.js.map +1 -0
- package/lib/module/BetRouter/api/types.js +2 -0
- package/lib/module/BetRouter/api/types.js.map +1 -0
- package/lib/module/BetRouter/components/AccountManager.js +584 -0
- package/lib/module/BetRouter/components/AccountManager.js.map +1 -0
- package/lib/module/BetRouter/components/AdminPortal.js +43 -0
- package/lib/module/BetRouter/components/AdminPortal.js.map +1 -0
- package/lib/module/BetRouter/components/BuyOpportunities.js +542 -0
- package/lib/module/BetRouter/components/BuyOpportunities.js.map +1 -0
- package/lib/module/BetRouter/components/BuyOpportunityCard.js +313 -0
- package/lib/module/BetRouter/components/BuyOpportunityCard.js.map +1 -0
- package/lib/module/BetRouter/components/ContestLiquidity.js +658 -0
- package/lib/module/BetRouter/components/ContestLiquidity.js.map +1 -0
- package/lib/module/BetRouter/components/ContestSelector.js +185 -0
- package/lib/module/BetRouter/components/ContestSelector.js.map +1 -0
- package/lib/module/BetRouter/components/MyOpportunities.js +324 -0
- package/lib/module/BetRouter/components/MyOpportunities.js.map +1 -0
- package/lib/module/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/lib/module/BetRouter/components/OpportunityDetailModal.js +538 -0
- package/lib/module/BetRouter/components/OpportunityDetailModal.js.map +1 -0
- package/lib/module/BetRouter/components/OpportunityHistory.js +481 -0
- package/lib/module/BetRouter/components/OpportunityHistory.js.map +1 -0
- package/lib/module/BetRouter/components/PartnerCredentials.js +222 -0
- package/lib/module/BetRouter/components/PartnerCredentials.js.map +1 -0
- package/lib/module/BetRouter/components/PlacedOpportunityModal.js +255 -0
- package/lib/module/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
- package/lib/module/BetRouter/components/admin/AutoFillView.js +372 -0
- package/lib/module/BetRouter/components/admin/AutoFillView.js.map +1 -0
- package/lib/module/BetRouter/components/admin/ConfigManager.js +806 -0
- package/lib/module/BetRouter/components/admin/ConfigManager.js.map +1 -0
- package/lib/module/BetRouter/components/admin/JobManager.js +888 -0
- package/lib/module/BetRouter/components/admin/JobManager.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueContests.js +2836 -0
- package/lib/module/BetRouter/components/admin/LeagueContests.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueInfo.js +372 -0
- package/lib/module/BetRouter/components/admin/LeagueInfo.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueParticipants.js +787 -0
- package/lib/module/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
- package/lib/module/BetRouter/index.js +399 -0
- package/lib/module/BetRouter/index.js.map +1 -0
- package/lib/module/BetRouter/layouts/DesktopAdminLayout.js +304 -0
- package/lib/module/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/DesktopLayout.js +263 -0
- package/lib/module/BetRouter/layouts/DesktopLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/MobileAdminLayout.js +427 -0
- package/lib/module/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/MobileLayout.js +285 -0
- package/lib/module/BetRouter/layouts/MobileLayout.js.map +1 -0
- package/lib/module/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/lib/module/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/lib/module/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/lib/module/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/lib/module/BetRouter/types/README.md +249 -0
- package/lib/module/BetRouter/types/accounts.js +2 -0
- package/lib/module/BetRouter/types/accounts.js.map +1 -0
- package/lib/module/BetRouter/types/api-contracts.js +770 -0
- package/lib/module/BetRouter/types/api-contracts.js.map +1 -0
- package/lib/module/BetRouter/types/config.js +2 -0
- package/lib/module/BetRouter/types/config.js.map +1 -0
- package/lib/module/BetRouter/types/contests.js +2 -0
- package/lib/module/BetRouter/types/contests.js.map +1 -0
- package/lib/module/BetRouter/types/credentials.js +78 -0
- package/lib/module/BetRouter/types/credentials.js.map +1 -0
- package/lib/module/BetRouter/types/index.js +17 -0
- package/lib/module/BetRouter/types/index.js.map +1 -0
- package/lib/module/BetRouter/types/jobs.js +2 -0
- package/lib/module/BetRouter/types/jobs.js.map +1 -0
- package/lib/module/BetRouter/types/leagues.js +2 -0
- package/lib/module/BetRouter/types/leagues.js.map +1 -0
- package/lib/module/BetRouter/types/liquidity.js +2 -0
- package/lib/module/BetRouter/types/liquidity.js.map +1 -0
- package/lib/module/BetRouter/types/markets.js +2 -0
- package/lib/module/BetRouter/types/markets.js.map +1 -0
- package/lib/module/BetRouter/types/opportunities.js +2 -0
- package/lib/module/BetRouter/types/opportunities.js.map +1 -0
- package/lib/module/BetRouter/types/orders.js +2 -0
- package/lib/module/BetRouter/types/orders.js.map +1 -0
- package/lib/module/BetRouter/types/participants.js +2 -0
- package/lib/module/BetRouter/types/participants.js.map +1 -0
- package/lib/module/BetRouter/types/partners.js +2 -0
- package/lib/module/BetRouter/types/partners.js.map +1 -0
- package/lib/module/Charts/README.md +310 -0
- package/lib/module/Charts/adapters/TradeChartAdapter.js +400 -0
- package/lib/module/Charts/adapters/TradeChartAdapter.js.map +1 -0
- package/lib/module/Charts/components/BaseLineChart.js +281 -0
- package/lib/module/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/module/Charts/components/LivePriceChart.js +497 -0
- package/lib/module/Charts/components/LivePriceChart.js.map +1 -0
- package/lib/module/Charts/index.js +36 -0
- package/lib/module/Charts/index.js.map +1 -0
- package/lib/module/Charts/themes/chartTheme.js +134 -0
- package/lib/module/Charts/themes/chartTheme.js.map +1 -0
- package/lib/module/Charts/types.js +2 -0
- package/lib/module/Charts/types.js.map +1 -0
- package/lib/module/Charts/utils/formatters.js +178 -0
- package/lib/module/Charts/utils/formatters.js.map +1 -0
- package/lib/module/Components/Dropdown.js +5 -3
- package/lib/module/Components/Dropdown.js.map +1 -1
- package/lib/module/Components/Icons.js +24 -1
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/index.js +3 -0
- package/lib/module/Components/index.js.map +1 -1
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js +16 -0
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts +109 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts +16 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts +16 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts +8 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts +14 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts +10 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts +7 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts +6 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/index.d.ts +8 -0
- package/lib/typescript/lib/commonjs/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts +20 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts +20 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts +743 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts +56 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts +87 -0
- package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts +31 -0
- package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts +45 -0
- package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/index.d.ts +95 -0
- package/lib/typescript/lib/commonjs/Charts/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts +106 -0
- package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/Charts/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts +24 -0
- package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +4 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/api/index.d.ts +108 -0
- package/lib/typescript/lib/module/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts +16 -0
- package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts +16 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts +8 -0
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts +15 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts +12 -0
- package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/index.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts +20 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts +20 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts +742 -0
- package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/config.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/contests.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts +55 -0
- package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/index.d.ts +14 -0
- package/lib/typescript/lib/module/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/markets.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/orders.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/participants.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/partners.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts +81 -0
- package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts +31 -0
- package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts +41 -0
- package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/index.d.ts +6 -0
- package/lib/typescript/lib/module/Charts/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts +102 -0
- package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/types.d.ts +2 -0
- package/lib/typescript/lib/module/Charts/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/utils/formatters.d.ts +14 -0
- package/lib/typescript/lib/module/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/module/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/index.d.ts +1 -0
- package/lib/typescript/lib/module/Components/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +3 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/BetRouter/api/index.d.ts +115 -0
- package/lib/typescript/src/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/src/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/AccountManager.d.ts +18 -0
- package/lib/typescript/src/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts +15 -0
- package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts +24 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts +19 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts +15 -0
- package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts +13 -0
- package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts +16 -0
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts +21 -0
- package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts +20 -0
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts +12 -0
- package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts +18 -0
- package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts +9 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts +8 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/index.d.ts +16 -0
- package/lib/typescript/src/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts +15 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts +44 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts +15 -0
- package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts +44 -0
- package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/accounts.d.ts +19 -0
- package/lib/typescript/src/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/api-contracts.d.ts +1071 -0
- package/lib/typescript/src/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/config.d.ts +12 -0
- package/lib/typescript/src/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/contests.d.ts +34 -0
- package/lib/typescript/src/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/credentials.d.ts +24 -0
- package/lib/typescript/src/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/index.d.ts +14 -0
- package/lib/typescript/src/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/jobs.d.ts +35 -0
- package/lib/typescript/src/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/leagues.d.ts +26 -0
- package/lib/typescript/src/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/liquidity.d.ts +14 -0
- package/lib/typescript/src/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/markets.d.ts +87 -0
- package/lib/typescript/src/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/opportunities.d.ts +88 -0
- package/lib/typescript/src/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/orders.d.ts +34 -0
- package/lib/typescript/src/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/participants.d.ts +33 -0
- package/lib/typescript/src/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/partners.d.ts +11 -0
- package/lib/typescript/src/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts +117 -0
- package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/src/Charts/components/BaseLineChart.d.ts +40 -0
- package/lib/typescript/src/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/src/Charts/components/LivePriceChart.d.ts +13 -0
- package/lib/typescript/src/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/src/Charts/index.d.ts +28 -0
- package/lib/typescript/src/Charts/index.d.ts.map +1 -0
- package/lib/typescript/src/Charts/themes/chartTheme.d.ts +78 -0
- package/lib/typescript/src/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/src/Charts/types.d.ts +155 -0
- package/lib/typescript/src/Charts/types.d.ts.map +1 -0
- package/lib/typescript/src/Charts/utils/formatters.d.ts +66 -0
- package/lib/typescript/src/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/src/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +1 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/index.d.ts +1 -0
- package/lib/typescript/src/Components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/ApiOverrides/index.ts +4 -0
- package/src/BetRouter/api/index.ts +854 -0
- package/src/BetRouter/api/types.ts +0 -0
- package/src/BetRouter/components/AccountManager.tsx +533 -0
- package/src/BetRouter/components/AdminPortal.tsx +44 -0
- package/src/BetRouter/components/BuyOpportunities.tsx +491 -0
- package/src/BetRouter/components/BuyOpportunityCard.tsx +331 -0
- package/src/BetRouter/components/ContestLiquidity.tsx +613 -0
- package/src/BetRouter/components/ContestSelector.tsx +179 -0
- package/src/BetRouter/components/MyOpportunities.tsx +279 -0
- package/src/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/src/BetRouter/components/OpportunityDetailModal.tsx +360 -0
- package/src/BetRouter/components/OpportunityHistory.tsx +408 -0
- package/src/BetRouter/components/PartnerCredentials.tsx +212 -0
- package/src/BetRouter/components/PlacedOpportunityModal.tsx +192 -0
- package/src/BetRouter/components/admin/AutoFillView.tsx +275 -0
- package/src/BetRouter/components/admin/ConfigManager.tsx +596 -0
- package/src/BetRouter/components/admin/JobManager.tsx +758 -0
- package/src/BetRouter/components/admin/LeagueContests.tsx +2443 -0
- package/src/BetRouter/components/admin/LeagueInfo.tsx +253 -0
- package/src/BetRouter/components/admin/LeagueParticipants.tsx +662 -0
- package/src/BetRouter/index.tsx +453 -0
- package/src/BetRouter/layouts/DesktopAdminLayout.tsx +348 -0
- package/src/BetRouter/layouts/DesktopLayout.tsx +292 -0
- package/src/BetRouter/layouts/MobileAdminLayout.tsx +387 -0
- package/src/BetRouter/layouts/MobileLayout.tsx +325 -0
- package/src/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/src/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/src/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/src/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/src/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/src/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/src/BetRouter/types/README.md +249 -0
- package/src/BetRouter/types/accounts.ts +21 -0
- package/src/BetRouter/types/api-contracts.ts +1164 -0
- package/src/BetRouter/types/config.ts +12 -0
- package/src/BetRouter/types/contests.ts +37 -0
- package/src/BetRouter/types/credentials.ts +99 -0
- package/src/BetRouter/types/index.ts +16 -0
- package/src/BetRouter/types/jobs.ts +37 -0
- package/src/BetRouter/types/leagues.ts +29 -0
- package/src/BetRouter/types/liquidity.ts +15 -0
- package/src/BetRouter/types/markets.ts +94 -0
- package/src/BetRouter/types/opportunities.ts +107 -0
- package/src/BetRouter/types/orders.ts +51 -0
- package/src/BetRouter/types/participants.ts +34 -0
- package/src/BetRouter/types/partners.ts +10 -0
- package/src/Charts/README.md +310 -0
- package/src/Charts/adapters/TradeChartAdapter.ts +471 -0
- package/src/Charts/components/BaseLineChart.tsx +293 -0
- package/src/Charts/components/LivePriceChart.tsx +521 -0
- package/src/Charts/index.tsx +62 -0
- package/src/Charts/themes/chartTheme.ts +113 -0
- package/src/Charts/types.ts +160 -0
- package/src/Charts/utils/formatters.ts +182 -0
- package/src/Components/Dropdown.tsx +6 -3
- package/src/Components/Icons.tsx +12 -0
- package/src/Components/index.tsx +4 -0
- package/src/index.tsx +6 -0
- package/src/types.d.ts +410 -2
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button, Text, View } from "../../Components/Themed"
|
|
3
|
+
import type { BuyOpportunity, PartnerMarketProps, RouterContestProps, RouterMarketProps, RouterMarketSideProps, RouterMarketVariableProps, RouterPartnerProps } from '../types';
|
|
4
|
+
import { showConfirmAlert } from '../../Components/ConfirmAlert';
|
|
5
|
+
import { BetRouterApi } from '../api';
|
|
6
|
+
import { useColors } from '../../constants/useColors';
|
|
7
|
+
import { ActivityIndicator, FlatList, ScrollView, Dimensions, RefreshControl, TouchableOpacity } from 'react-native';
|
|
8
|
+
import { Icons, SearchBox } from '../../Components';
|
|
9
|
+
import Dropdown from '../../Components/Dropdown';
|
|
10
|
+
import Pagination from '../../Components/Pagination';
|
|
11
|
+
import moment from 'moment-mini';
|
|
12
|
+
import OpportunityDetailModal from './OpportunityDetailModal';
|
|
13
|
+
import BuyOpportunityCard from './BuyOpportunityCard';
|
|
14
|
+
|
|
15
|
+
type BuyOpportunitiesProps = {
|
|
16
|
+
width:number,
|
|
17
|
+
loading?:boolean,
|
|
18
|
+
router_contests: RouterContestProps[],
|
|
19
|
+
router_markets: RouterMarketProps[];
|
|
20
|
+
router_market_sides: RouterMarketSideProps[];
|
|
21
|
+
router_market_variables: RouterMarketVariableProps[];
|
|
22
|
+
partner_markets: PartnerMarketProps[];
|
|
23
|
+
partners: RouterPartnerProps[];
|
|
24
|
+
buy_opportunities: BuyOpportunity[];
|
|
25
|
+
insets?: { top: number; bottom: number; left: number; right: number };
|
|
26
|
+
onBuyOpportunity?: (opportunity: BuyOpportunity, legIndex?: number) => void;
|
|
27
|
+
onRefresh?: () => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const BuyOpportunities = ({ width, partners, loading, router_contests, buy_opportunities, router_market_variables, router_market_sides, router_markets, insets, onBuyOpportunity, onRefresh }: BuyOpportunitiesProps) => {
|
|
32
|
+
const Colors = useColors()
|
|
33
|
+
const [refreshing, setRefreshing] = useState(false);
|
|
34
|
+
const [ opportunity_type, setOpportunityType ] = useState('All');
|
|
35
|
+
const [ offset, setOffset ] = useState(0);
|
|
36
|
+
const [ expanded_opportunities, setExpandedOpportunities ] = useState<string[]>([]);
|
|
37
|
+
const [ search_text, setSearchText ] = useState('');
|
|
38
|
+
const [ selected_date, setSelectedDate ] = useState<string | null>(null);
|
|
39
|
+
const [ selected_opportunity, setSelectedOpportunity ] = useState<BuyOpportunity | null>(null);
|
|
40
|
+
const [ modal_visible, setModalVisible ] = useState(false);
|
|
41
|
+
const [ buying, setBuying ] = useState(false);
|
|
42
|
+
const [ buy_results, setBuyResults ] = useState<any>(null);
|
|
43
|
+
const [ show_results_modal, setShowResultsModal ] = useState(false);
|
|
44
|
+
const [ selected_partner_ids, setSelectedPartnerIds ] = useState<string[]>(partners.map(p => p.partner_id));
|
|
45
|
+
|
|
46
|
+
const confirmBuy = (buy_opportunity:BuyOpportunity, legIndex?: number) => {
|
|
47
|
+
showConfirmAlert('Are you sure?', '',
|
|
48
|
+
() => handleBuy(buy_opportunity, legIndex),
|
|
49
|
+
() => console.log('')
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const all_expanded = width > 1800 ? true : false
|
|
54
|
+
|
|
55
|
+
// Ensure all partners are selected when partners list changes
|
|
56
|
+
React.useEffect(() => {
|
|
57
|
+
if (partners.length > 0 && selected_partner_ids.length === 0) {
|
|
58
|
+
setSelectedPartnerIds(partners.map(p => p.partner_id));
|
|
59
|
+
}
|
|
60
|
+
}, [partners]);
|
|
61
|
+
|
|
62
|
+
// Extract unique dates from opportunities (converted to local browser time)
|
|
63
|
+
const available_dates = Array.from(new Set(
|
|
64
|
+
buy_opportunities.map(opp => {
|
|
65
|
+
const contest = router_contests?.find(c => c.router_contest_id === opp.router_contest_id);
|
|
66
|
+
if (contest?.scheduled_datetime) {
|
|
67
|
+
// Convert timestamp to local browser time and get date string
|
|
68
|
+
return moment(contest.scheduled_datetime).format('YYYY-MM-DD');
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}).filter(Boolean)
|
|
72
|
+
)).sort();
|
|
73
|
+
|
|
74
|
+
const filtered_opportunities = buy_opportunities
|
|
75
|
+
.filter(opp => {
|
|
76
|
+
// Filter by opportunity type
|
|
77
|
+
const type_match = opportunity_type === 'All' || opp.opportunity_type === opportunity_type.toLowerCase().replace(' ', '_');
|
|
78
|
+
|
|
79
|
+
const contest = router_contests?.find(c => c.router_contest_id === opp.router_contest_id);
|
|
80
|
+
|
|
81
|
+
// Filter by date (using local browser time)
|
|
82
|
+
let date_match = true;
|
|
83
|
+
if (selected_date && contest?.scheduled_datetime) {
|
|
84
|
+
const opp_date = moment(contest.scheduled_datetime).format('YYYY-MM-DD');
|
|
85
|
+
date_match = opp_date === selected_date;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Filter by contest search
|
|
89
|
+
let search_match = true;
|
|
90
|
+
if (search_text && search_text.trim() !== '') {
|
|
91
|
+
search_match = contest?.contest_label?.toLowerCase().includes(search_text.toLowerCase()) || false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Filter by partner - exclude if ANY leg has a partner that's not selected
|
|
95
|
+
const partner_match = opp.legs.every(leg => selected_partner_ids.includes(leg.partner_id));
|
|
96
|
+
|
|
97
|
+
return type_match && date_match && search_match && partner_match;
|
|
98
|
+
})
|
|
99
|
+
.sort((a,b) => b.expected_value - a.expected_value)
|
|
100
|
+
.slice((offset * 6), (offset * 6) + 6)
|
|
101
|
+
|
|
102
|
+
const handleBuy = async(buy_opportunity:BuyOpportunity, legIndex?: number) => {
|
|
103
|
+
try {
|
|
104
|
+
setBuying(true);
|
|
105
|
+
const result = await BetRouterApi.BetRouter.OpportunityApi.buyOpportunity(buy_opportunity);
|
|
106
|
+
setBuyResults(result);
|
|
107
|
+
setShowResultsModal(true);
|
|
108
|
+
|
|
109
|
+
// Call parent handler if provided (for refreshing data, etc.)
|
|
110
|
+
if (onBuyOpportunity) {
|
|
111
|
+
onBuyOpportunity(buy_opportunity, legIndex);
|
|
112
|
+
}
|
|
113
|
+
} catch (error) {
|
|
114
|
+
console.error('Error buying opportunity:', error);
|
|
115
|
+
alert('Error placing bets: ' + (error as any).message);
|
|
116
|
+
} finally {
|
|
117
|
+
setBuying(false);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const handleRefresh = async () => {
|
|
122
|
+
console.log('handleRefresh called, onRefresh exists:', !!onRefresh);
|
|
123
|
+
if (!onRefresh) {
|
|
124
|
+
console.log('No onRefresh prop provided');
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
setRefreshing(true);
|
|
129
|
+
console.log('Starting refresh...');
|
|
130
|
+
try {
|
|
131
|
+
await onRefresh();
|
|
132
|
+
console.log('Refresh completed');
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.error('Error refreshing opportunities:', error);
|
|
135
|
+
} finally {
|
|
136
|
+
setRefreshing(false);
|
|
137
|
+
console.log('Refresh state cleared');
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const renderBuyOpportunity = (renderData: { item: BuyOpportunity, index: number }) => {
|
|
142
|
+
const expanded = expanded_opportunities.includes(renderData.item.opportunity_id) || all_expanded;
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<BuyOpportunityCard
|
|
146
|
+
opportunity={renderData.item}
|
|
147
|
+
router_markets={router_markets}
|
|
148
|
+
router_market_sides={router_market_sides}
|
|
149
|
+
router_market_variables={router_market_variables}
|
|
150
|
+
partners={partners}
|
|
151
|
+
router_contests={router_contests}
|
|
152
|
+
onBuy={(opp, legIndex) => {
|
|
153
|
+
confirmBuy(opp, legIndex);
|
|
154
|
+
}}
|
|
155
|
+
expanded={expanded}
|
|
156
|
+
onToggleExpand={all_expanded ? undefined : () => {
|
|
157
|
+
if (expanded) {
|
|
158
|
+
setExpandedOpportunities(expanded_opportunities.filter(eo => eo !== renderData.item.opportunity_id));
|
|
159
|
+
} else {
|
|
160
|
+
setExpandedOpportunities([...expanded_opportunities, renderData.item.opportunity_id]);
|
|
161
|
+
}
|
|
162
|
+
}}
|
|
163
|
+
onPress={() => {
|
|
164
|
+
setSelectedOpportunity(renderData.item);
|
|
165
|
+
setModalVisible(true);
|
|
166
|
+
}}
|
|
167
|
+
/>
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// Render Buy Results Modal
|
|
172
|
+
const renderBuyResultsModal = () => {
|
|
173
|
+
if (!show_results_modal || !buy_results) return null;
|
|
174
|
+
|
|
175
|
+
// Use the API's summary fields
|
|
176
|
+
const success_count = buy_results.successful_orders || 0;
|
|
177
|
+
const total_count = buy_results.total_legs || 0;
|
|
178
|
+
const all_success = buy_results.success && success_count === total_count;
|
|
179
|
+
const orders = buy_results.router_orders || [];
|
|
180
|
+
|
|
181
|
+
// Calculate available height respecting insets
|
|
182
|
+
const screenHeight = Dimensions.get('window').height;
|
|
183
|
+
const topInset = insets?.top || 0;
|
|
184
|
+
const bottomInset = insets?.bottom || 0;
|
|
185
|
+
const modalPadding = 40; // 20px top + 20px bottom
|
|
186
|
+
const maxModalHeight = screenHeight - topInset - bottomInset - modalPadding;
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
<View
|
|
190
|
+
style={{
|
|
191
|
+
position: 'absolute',
|
|
192
|
+
top: topInset,
|
|
193
|
+
left: 0,
|
|
194
|
+
right: 0,
|
|
195
|
+
bottom: bottomInset,
|
|
196
|
+
backgroundColor: Colors.views.blur,
|
|
197
|
+
justifyContent: 'center',
|
|
198
|
+
alignItems: 'center',
|
|
199
|
+
padding: 20,
|
|
200
|
+
zIndex: 1000
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
<View float style={{ maxWidth: 600, width: '100%', height: maxModalHeight }}>
|
|
204
|
+
<View type='header' style={{ padding: 20, borderTopLeftRadius: 8, borderTopRightRadius: 8 }}>
|
|
205
|
+
<View transparent style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
206
|
+
{all_success ? (
|
|
207
|
+
<Icons.CheckCirlceIcon color={Colors.text.success} size={24} />
|
|
208
|
+
) : (
|
|
209
|
+
<Text style={{ fontSize: 24 }}>⚠️</Text>
|
|
210
|
+
)}
|
|
211
|
+
<Text theme='h1' style={{ fontSize: 18 }}>
|
|
212
|
+
{all_success ? 'Bets Placed Successfully!' : 'Partial Success'}
|
|
213
|
+
</Text>
|
|
214
|
+
</View>
|
|
215
|
+
<Text theme='description' style={{ marginTop: 5 }}>
|
|
216
|
+
{success_count}/{total_count} legs placed successfully
|
|
217
|
+
</Text>
|
|
218
|
+
</View>
|
|
219
|
+
|
|
220
|
+
<View style={{ flex: 1 }}>
|
|
221
|
+
<ScrollView style={{ flex: 1 }}>
|
|
222
|
+
<View type='body' style={{ padding: 20 }}>
|
|
223
|
+
{orders.map((order: any, index: number) => {
|
|
224
|
+
const partner = partners.find(p => p.partner_id === order.partner_id);
|
|
225
|
+
const isSuccess = order.status === 'open';
|
|
226
|
+
return (
|
|
227
|
+
<View
|
|
228
|
+
key={index}
|
|
229
|
+
style={{
|
|
230
|
+
padding: 15,
|
|
231
|
+
marginBottom: 10,
|
|
232
|
+
backgroundColor: Colors.views.body,
|
|
233
|
+
borderRadius: 8,
|
|
234
|
+
borderWidth: 1,
|
|
235
|
+
borderColor: isSuccess ? Colors.text.success : Colors.text.warning
|
|
236
|
+
}}
|
|
237
|
+
>
|
|
238
|
+
<View transparent style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 8 }}>
|
|
239
|
+
<Text style={{ fontSize: 16, marginRight: 4 }}>
|
|
240
|
+
{isSuccess ? '✓' : '✗'}
|
|
241
|
+
</Text>
|
|
242
|
+
<Text theme='h2' style={{ marginLeft: 4, fontSize: 14 }}>
|
|
243
|
+
{partner?.name || order.partner_id}
|
|
244
|
+
</Text>
|
|
245
|
+
</View>
|
|
246
|
+
|
|
247
|
+
<Text theme='description' style={{ marginTop: 3, fontSize: 12 }}>
|
|
248
|
+
{order.title || 'Bet placed'}
|
|
249
|
+
</Text>
|
|
250
|
+
|
|
251
|
+
{isSuccess ? (
|
|
252
|
+
<>
|
|
253
|
+
<Text theme='description' style={{ marginTop: 5, fontSize: 11 }}>
|
|
254
|
+
Order ID: {order.router_order_id || 'N/A'}
|
|
255
|
+
</Text>
|
|
256
|
+
<Text theme='description' style={{ marginTop: 2, fontSize: 11 }}>
|
|
257
|
+
Amount: ${order.amount?.toFixed(2) || '0.00'}
|
|
258
|
+
</Text>
|
|
259
|
+
<Text theme='description' style={{ marginTop: 2, fontSize: 11 }}>
|
|
260
|
+
Status: {order.status}
|
|
261
|
+
</Text>
|
|
262
|
+
</>
|
|
263
|
+
) : (
|
|
264
|
+
<Text style={{ marginTop: 5, fontSize: 11, color: Colors.text.error }}>
|
|
265
|
+
Status: {order.status} - {order.error || 'Failed to place bet'}
|
|
266
|
+
</Text>
|
|
267
|
+
)}
|
|
268
|
+
</View>
|
|
269
|
+
);
|
|
270
|
+
})}
|
|
271
|
+
</View>
|
|
272
|
+
</ScrollView>
|
|
273
|
+
</View>
|
|
274
|
+
|
|
275
|
+
<View type='footer' style={{ padding: 15, borderBottomLeftRadius: 8, borderBottomRightRadius: 8 }}>
|
|
276
|
+
<Button
|
|
277
|
+
title='Close'
|
|
278
|
+
onPress={() => {
|
|
279
|
+
setShowResultsModal(false);
|
|
280
|
+
setBuyResults(null);
|
|
281
|
+
}}
|
|
282
|
+
type='action'
|
|
283
|
+
style={{ width: '100%' }}
|
|
284
|
+
/>
|
|
285
|
+
</View>
|
|
286
|
+
</View>
|
|
287
|
+
</View>
|
|
288
|
+
);
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
return (
|
|
292
|
+
<View transparent style={{ flex:1 }}>
|
|
293
|
+
{/* Loading Overlay */}
|
|
294
|
+
{buying && (
|
|
295
|
+
<View
|
|
296
|
+
style={{
|
|
297
|
+
position: 'absolute',
|
|
298
|
+
top: 0,
|
|
299
|
+
left: 0,
|
|
300
|
+
right: 0,
|
|
301
|
+
bottom: 0,
|
|
302
|
+
backgroundColor: Colors.views.blur,
|
|
303
|
+
justifyContent: 'center',
|
|
304
|
+
alignItems: 'center',
|
|
305
|
+
zIndex: 999
|
|
306
|
+
}}
|
|
307
|
+
>
|
|
308
|
+
<View float style={{ padding: 30, alignItems: 'center' }}>
|
|
309
|
+
<ActivityIndicator size='large' color={Colors.text.action} />
|
|
310
|
+
<Text theme='h2' style={{ marginTop: 15, fontSize: 16 }}>
|
|
311
|
+
Placing Bets...
|
|
312
|
+
</Text>
|
|
313
|
+
<Text theme='description' style={{ marginTop: 5, fontSize: 12 }}>
|
|
314
|
+
This may take a few moments
|
|
315
|
+
</Text>
|
|
316
|
+
</View>
|
|
317
|
+
</View>
|
|
318
|
+
)}
|
|
319
|
+
|
|
320
|
+
{/* Buy Results Modal */}
|
|
321
|
+
{renderBuyResultsModal()}
|
|
322
|
+
|
|
323
|
+
<OpportunityDetailModal
|
|
324
|
+
visible={modal_visible}
|
|
325
|
+
opportunity={selected_opportunity}
|
|
326
|
+
router_contests={router_contests}
|
|
327
|
+
router_markets={router_markets}
|
|
328
|
+
router_market_sides={router_market_sides}
|
|
329
|
+
partners={partners}
|
|
330
|
+
onClose={() => {
|
|
331
|
+
setModalVisible(false);
|
|
332
|
+
setSelectedOpportunity(null);
|
|
333
|
+
}}
|
|
334
|
+
insets={insets}
|
|
335
|
+
onBuyComplete={(result, opportunity) => {
|
|
336
|
+
// Show results modal
|
|
337
|
+
setBuyResults(result);
|
|
338
|
+
setShowResultsModal(true);
|
|
339
|
+
|
|
340
|
+
// Call parent handler if provided
|
|
341
|
+
if (onBuyOpportunity) {
|
|
342
|
+
onBuyOpportunity(opportunity);
|
|
343
|
+
}
|
|
344
|
+
}}
|
|
345
|
+
/>
|
|
346
|
+
<View transparent style={{ flex: 1 }}>
|
|
347
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
348
|
+
<View transparent style={{ flex:1, flexDirection:'row', alignItems:'center', gap:10 }}>
|
|
349
|
+
{(loading || refreshing) ?
|
|
350
|
+
<ActivityIndicator style={{ padding:5 }} size='small' color={Colors.text.h1} />
|
|
351
|
+
:
|
|
352
|
+
<TouchableOpacity onPress={handleRefresh} style={{ padding:5 }}>
|
|
353
|
+
<Icons.RefreshIcon
|
|
354
|
+
size={20}
|
|
355
|
+
color={Colors.text.action}
|
|
356
|
+
/>
|
|
357
|
+
</TouchableOpacity>
|
|
358
|
+
}
|
|
359
|
+
<View transparent style={{ flex:1 }}>
|
|
360
|
+
<Text theme='h1'>Buy Opportunities</Text>
|
|
361
|
+
<Text theme='description' style={{ marginTop:3 }}>
|
|
362
|
+
{buy_opportunities.length} opportunit{buy_opportunities.length !== 1 ? 'ies' : 'y'} found
|
|
363
|
+
</Text>
|
|
364
|
+
</View>
|
|
365
|
+
</View>
|
|
366
|
+
<View float style={{ width:200, margin:5 }}>
|
|
367
|
+
<Dropdown
|
|
368
|
+
dropdown_options={[
|
|
369
|
+
{ value: '', eligible_options: ['All', 'Arbitrage', 'Middle', 'Reverse Middle'] }
|
|
370
|
+
]}
|
|
371
|
+
selected_value={opportunity_type}
|
|
372
|
+
onOptionSelect={(option) => setOpportunityType(option)}
|
|
373
|
+
/>
|
|
374
|
+
</View>
|
|
375
|
+
</View>
|
|
376
|
+
<ScrollView
|
|
377
|
+
style={{ flex: 1 }}
|
|
378
|
+
refreshControl={
|
|
379
|
+
<RefreshControl
|
|
380
|
+
refreshing={refreshing}
|
|
381
|
+
onRefresh={handleRefresh}
|
|
382
|
+
colors={[Colors.text.action]}
|
|
383
|
+
tintColor={Colors.text.action}
|
|
384
|
+
/>
|
|
385
|
+
}
|
|
386
|
+
>
|
|
387
|
+
<View transparent style={{ padding: 10 }}>
|
|
388
|
+
<SearchBox
|
|
389
|
+
onChange={(text) => setSearchText(text) }
|
|
390
|
+
hide_search_button
|
|
391
|
+
/>
|
|
392
|
+
|
|
393
|
+
{/* Partner Filter */}
|
|
394
|
+
<View transparent style={{ marginTop: 10, marginBottom: 5 }}>
|
|
395
|
+
<Text theme='description' style={{ marginBottom: 5, fontSize: 12 }}>
|
|
396
|
+
Filter by Partners:
|
|
397
|
+
</Text>
|
|
398
|
+
<ScrollView
|
|
399
|
+
horizontal
|
|
400
|
+
showsHorizontalScrollIndicator={false}
|
|
401
|
+
contentContainerStyle={{ paddingHorizontal: 5 }}
|
|
402
|
+
>
|
|
403
|
+
{partners.map(partner => {
|
|
404
|
+
const isSelected = selected_partner_ids.includes(partner.partner_id);
|
|
405
|
+
return (
|
|
406
|
+
<Button
|
|
407
|
+
key={partner.partner_id}
|
|
408
|
+
title={partner.name}
|
|
409
|
+
title_color={isSelected ? Colors.text.success : Colors.text.h1}
|
|
410
|
+
onPress={() => {
|
|
411
|
+
if (isSelected) {
|
|
412
|
+
setSelectedPartnerIds(selected_partner_ids.filter(id => id !== partner.partner_id));
|
|
413
|
+
} else {
|
|
414
|
+
setSelectedPartnerIds([...selected_partner_ids, partner.partner_id]);
|
|
415
|
+
}
|
|
416
|
+
setOffset(0); // Reset pagination
|
|
417
|
+
}}
|
|
418
|
+
style={{
|
|
419
|
+
padding: 10,
|
|
420
|
+
margin: 5,
|
|
421
|
+
borderWidth: 1,
|
|
422
|
+
borderColor: isSelected ? Colors.text.success : Colors.borders.light,
|
|
423
|
+
opacity: isSelected ? 1 : 0.5
|
|
424
|
+
}}
|
|
425
|
+
/>
|
|
426
|
+
);
|
|
427
|
+
})}
|
|
428
|
+
</ScrollView>
|
|
429
|
+
</View>
|
|
430
|
+
|
|
431
|
+
<ScrollView
|
|
432
|
+
horizontal
|
|
433
|
+
showsHorizontalScrollIndicator={false}
|
|
434
|
+
style={{ marginVertical: 10 }}
|
|
435
|
+
contentContainerStyle={{ paddingHorizontal: 5 }}
|
|
436
|
+
>
|
|
437
|
+
<Button
|
|
438
|
+
title="All Dates"
|
|
439
|
+
title_color={selected_date ? Colors.text.h1 : Colors.text.success}
|
|
440
|
+
onPress={() => setSelectedDate(null)}
|
|
441
|
+
style={{ padding:10, margin:5, borderWidth:1, borderColor: selected_date ? Colors.borders.light : Colors.text.success }}
|
|
442
|
+
/>
|
|
443
|
+
{available_dates.map((date) => {
|
|
444
|
+
const dateObj = moment(date as any);
|
|
445
|
+
const today = moment().startOf('day');
|
|
446
|
+
const tomorrow = moment().add(1, 'day').startOf('day');
|
|
447
|
+
|
|
448
|
+
const isToday = dateObj.isSame(today, 'day');
|
|
449
|
+
const isTomorrow = dateObj.isSame(tomorrow, 'day');
|
|
450
|
+
|
|
451
|
+
let displayText = '';
|
|
452
|
+
if (isToday) {
|
|
453
|
+
displayText = 'Today';
|
|
454
|
+
} else if (isTomorrow) {
|
|
455
|
+
displayText = 'Tomorrow';
|
|
456
|
+
} else {
|
|
457
|
+
displayText = dateObj.format('MMM D');
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
return (
|
|
461
|
+
<Button
|
|
462
|
+
key={date}
|
|
463
|
+
title={displayText}
|
|
464
|
+
title_color={selected_date == date ? Colors.text.success : Colors.text.h1}
|
|
465
|
+
onPress={() => setSelectedDate(date)}
|
|
466
|
+
style={{ padding:10, margin:5, borderWidth:1, borderColor: selected_date == date ? Colors.text.success : Colors.borders.light }}
|
|
467
|
+
/>
|
|
468
|
+
);
|
|
469
|
+
})}
|
|
470
|
+
</ScrollView>
|
|
471
|
+
<Pagination
|
|
472
|
+
offset={offset}
|
|
473
|
+
onNext={() => setOffset(offset + 1)}
|
|
474
|
+
onPrevious={() => setOffset(offset - 1)}
|
|
475
|
+
/>
|
|
476
|
+
<FlatList
|
|
477
|
+
data={filtered_opportunities}
|
|
478
|
+
keyExtractor={(item) => item.opportunity_id}
|
|
479
|
+
renderItem={renderBuyOpportunity}
|
|
480
|
+
scrollEnabled={false}
|
|
481
|
+
/>
|
|
482
|
+
</View>
|
|
483
|
+
</ScrollView>
|
|
484
|
+
</View>
|
|
485
|
+
</View>
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
export default BuyOpportunities
|