We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ceff22a commit bffa8e9Copy full SHA for bffa8e9
src/view.js
@@ -2,8 +2,8 @@ export const renderItems = (data) => {
2
const listaHobby = document.createElement('ul');
3
listaHobby.classList.add('container');
4
5
- data.forEach((item) => {
6
- listaHobby.innerHTML+=`
+ const todosOsCards = data.map((item) => {
+ return `
7
<li itemscope itemtype="http://https://schema.org/HobbyShop" class="containerLi">
8
<dl itemscope itemtype="#hobby">
9
<dt><img src="${item.imageUrl}" alt="imagem do card" itemprop="${item.name}" class="imagem_card" /></dt>
@@ -20,7 +20,7 @@ export const renderItems = (data) => {
20
`;
21
})
22
23
-
+ listaHobby.innerHTML+=todosOsCards.join('');
24
return listaHobby;
25
};
26
0 commit comments