window.renderStandings = ({clubID, env, divId}) => {
fetch(`https://api.ussquash.com/resources/trn/tournaments?TopRecords=20&ngbId=9999&OrganizerType=1&Sanctioned=1&Status=1&State=0&EventType=74`, { method: 'get' })
.then((response) => response.json()) .then((a) => {console.log(a); return a}) .then((response) => response.map(({StartDate, TournamentName, SiteCity, LogoImageUrl, TournamentID, EndDate, EventType}) => `
`) ) .then((rows) => { document.getElementById(divId).innerHTML = `
-
${rows.join('\n')}
` }) .catch(function(err) { throw err }); }