added restaurant, tag, and comments to reviewDetails

Co-authored-by: rheabhutada02
This commit is contained in:
d7hernan 2022-11-20 22:22:31 -08:00
parent 6d126f6085
commit 9ef3c59fee
2 changed files with 9 additions and 8 deletions

View File

@ -25,7 +25,7 @@
<!--- meal -->
<div class = "meal-name">
<h1 id="d-mealName"> Cucumber Salad </h1>
<h1 id="d-mealName"> default meal name </h1>
</div>
<div class = "meal-pics-and-tags">
@ -33,14 +33,15 @@
<img src = https://images.pexels.com/photos/1640777/pexels-photo-1640777.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1,
alt = "photo" width=40% height=40% id="d-mealImg">
<div class = "tag-container", id="d-tags">
<h2 id="d-restaurant"> default comment </h2>
<div class = "tag-container", id="d-tags">
</div>
</div>
<div class = "stars-and-comments">
<img src = "./assets/images/icons/5-star.svg" width=10% height=10% id="d-rating">
<h2> The food was good </h2>
<h2 id="d-comments"> default comment </h2>
</div>
<main>

View File

@ -29,18 +29,18 @@ function setupInfo(){
mealLabel.innerHTML = currReview["mealName"];
//restaurant name
/*let restaurantLabel = document.getElementById("d-restaurant");
let restaurantLabel = document.getElementById("d-restaurant");
restaurantLabel.innerHTML = currReview["restaurant"];
//comments
let comments = document.getElementById("d-comments");
comments.innerText = currReview["comments"];
*/
//rating
let starsImg = document.getElementById("d-rating");
starsImg.setAttribute("src", "./assets/images/icons/"+currReview["rating"]+"-star.svg");
starsImg.setAttribute("alt", currReview["rating"] +" stars");
/*
//tags
let tagContainer = document.getElementById("d-tags");
if(currReview["tags"]){
@ -50,7 +50,7 @@ function setupInfo(){
newTag.innerHTML = currReview["tags"][i];
tagContainer.append(newTag);
}
}*/
}
}
function setupDelete(){