Skip to content

Commit

Permalink
Update: Enhanced loading times (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed May 23, 2024
1 parent 8879184 commit b31bc02
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MovieVerse-Frontend/js/movie-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ function showMovies(movies, mainElement) {
words[8] = '...';
title = words.slice(0, 9).join(' ');
}
let overview = movie.overview;
if (overview === '') {
overview = 'No overview available.';
}
movieEl.innerHTML = `
${movieImage}
<div class="movie-info" style="display: flex; justify-content: space-between; align-items: start; cursor: pointer;">
Expand All @@ -354,7 +358,7 @@ function showMovies(movies, mainElement) {
</div>
<div class="overview" style="cursor: pointer;">
<h4>Overview: </h4>
${movie.overview}
${overview}
</div>`;
movieEl.addEventListener('click', () => {
localStorage.setItem('selectedMovieId', movie.id);
Expand Down

0 comments on commit b31bc02

Please sign in to comment.