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