Skip to content

Commit

Permalink
channels arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ghnp5 committed Nov 13, 2024
1 parent e5280dc commit e015b49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2>Plataformas de Streaming</h2>
<div class="grid-container" id="streaming-grid"></div>

<script>
const genHtml = (div) = () => {
const genHtml = (div) = (channels) => {
const gridContainer = document.getElementById(div);
channels.forEach(channel => {
const item = document.createElement("div");
Expand All @@ -67,11 +67,11 @@ <h2>Plataformas de Streaming</h2>

fetch('livetv.json')
.then(response => response.json())
.then(channels => genHtml('livetv-grid'))
.then(genHtml('livetv-grid'))
.catch(error => console.error('Erro (livetv):', error));
fetch('streaming.json')
.then(response => response.json())
.then(channels => genHtml('streaming-grid'))
.then(genHtml('streaming-grid'))
.catch(error => console.error('Erro (streaming):', error));
</script>
</body>
Expand Down

0 comments on commit e015b49

Please sign in to comment.