Skip to content

Commit

Permalink
relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
analaura-a committed Jul 9, 2023
1 parent a424182 commit af0afee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const appMovie = new Vue({
});

//Dependiendo del estado de la peli, modificamos la interfaz
if (window.location.pathname == "/html/favorites.html") {
if (window.location.pathname == "/movie-app-vue/html/favorites.html") {
console.log("estoy en favoritos")
if (this.favorites.some(movie => `fav-${movie.id}` === favID)) {
fav.style.backgroundImage = "url('movie-app-vue/assets/svg/heart-fill.svg')";
Expand Down Expand Up @@ -207,7 +207,7 @@ const appMovie = new Vue({

//Actualizamos la interfaz

if (window.location.pathname == "/html/favorites.html") {
if (window.location.pathname == "/movie-app-vue/html/favorites.html") {
clickedElement.style.backgroundImage = "url('movie-app-vue/assets/svg/heart-outlined.svg')";

this.favorites.forEach(movie => {
Expand All @@ -230,7 +230,7 @@ const appMovie = new Vue({
console.log("Esta peli no está en favoritos, voy a agregarla");

//Actualizamos la interfaz
if (window.location.pathname == "/html/favorites.html") {
if (window.location.pathname == "/movie-app-vue/html/favorites.html") {
clickedElement.style.backgroundImage = "url('movie-app-vue/assets/svg/heart-fill.svg')";
} else {
clickedElement.style.backgroundImage = "url('assets/svg/heart-fill.svg')";
Expand Down

0 comments on commit af0afee

Please sign in to comment.