within the return statement there is a link element that has an object property as its value/href.
This link is wrapped around each item in my array. When the link is clicked “Cannot GET /src/html/undefined”
const displayMovies = (Movies) => {
const htmlString = Movies
.map((item) => {
return `
<div class="Media-Card">
<a href='${item.page}'><img class='Poster' src="${item.poster}" ></img></a>
<h1 class='Media-Card-Header'>${item.title}</h1>
</div>
`;
})
.join('');
searchlist.innerHTML = htmlString;
};
Within my object class, I have declared and assigned a value for href.
this.page = page;