Created
January 5, 2022 06:21
-
-
Save kgravenreuth/94fe14a72e2fe2474328cb6d45d0511d to your computer and use it in GitHub Desktop.
Cloudbet Market Helper - Render all lines for all markets of a Sport
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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