Skip to content

Instantly share code, notes, and snippets.

@kgravenreuth
Created January 5, 2022 06:21
Show Gist options
  • Save kgravenreuth/94fe14a72e2fe2474328cb6d45d0511d to your computer and use it in GitHub Desktop.
Save kgravenreuth/94fe14a72e2fe2474328cb6d45d0511d to your computer and use it in GitHub Desktop.
Cloudbet Market Helper - Render all lines for all markets of a Sport
//Event.js
const eventMarkets = React.useMemo(() => {
let markets = [];
sportMarkets[sportKey].forEach(market => {
const [current, err] = getMarket(event, market);
if(!err){
markets = markets.concat(current);
}
})
return markets;
}, [event, sportKey]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment