diff --git a/index.html b/index.html index 5905ae0..d4cae94 100644 --- a/index.html +++ b/index.html @@ -53,13 +53,13 @@

08 Jun

Inscreva-se - Submeter palestra + Submeter palestra
Palestras mais votadas
- Ver todas + Ver todas
diff --git a/js/main.js b/js/main.js index c923ac0..8da72c9 100644 --- a/js/main.js +++ b/js/main.js @@ -1,3 +1,4 @@ +const MEETUP_ISSUE_ID = 14; fetch('https://api.github.com/repos/devfsa/vagas/issues') .then(response => { response.json() @@ -39,7 +40,8 @@ fetch('https://api.github.com/repos/devfsa/vagas/issues') console.log('Fetch Error:', err); }); -fetch('https://api.github.com/repos/devfsa/meetups/issues/14/comments', { headers: { "Accept": "text" } }) + +fetch(`https://api.github.com/repos/devfsa/meetups/issues/${MEETUP_ISSUE_ID}/comments`, { headers: { "Accept": "text" } }) .then(response => { response.json() .then(data => { @@ -98,3 +100,10 @@ fetch('https://api.github.com/repos/devfsa/meetups/issues/14/comments', { header .catch(err => { console.log('Fetch Error:', err); }); + +window.onload = (ev) => { + let submissionDOM = document.getElementById('submission'); + let seeallDom = document.getElementById('seeall'); + submissionDOM.href=`https://github.com/devfsa/meetups/issues/${MEETUP_ISSUE_ID}`; + seeallDom.href=`https://github.com/devfsa/meetups/issues/${MEETUP_ISSUE_ID}`; +} \ No newline at end of file