+
+
diff --git a/package.json b/package.json
index c21fbe9..0d02693 100644
--- a/package.json
+++ b/package.json
@@ -2,9 +2,9 @@
"name": "food-journal",
"version": "1.0.0",
"scripts": {
- "test": "mocha --recursive **/*.test.js",
+ "test": "mocha --recursive './{,!(node_modules)/**}/*.test.js'",
"lint": "eslint **/*.js",
- "fix-style": "eslint --fix **/*.js"
+ "fix-style": "eslint --fix '**/*.js'"
},
"devDependencies": {
"eslint": "^8.27.0",
diff --git a/source/assets/scripts/ReviewCard.js b/source/assets/scripts/ReviewCard.js
index 1b66a88..7f5806f 100644
--- a/source/assets/scripts/ReviewCard.js
+++ b/source/assets/scripts/ReviewCard.js
@@ -102,6 +102,7 @@ class ReviewCard extends HTMLElement {
* "mealName": "string",
* "restaurant": "string",
* "rating": number
+ * "tags": string array
* }
*/
set data(data) {
@@ -138,10 +139,21 @@ class ReviewCard extends HTMLElement {
div.append(span1);
div.append(img2);
+ //added tags
+ let tagContainer = document.createElement('div')
+ tagContainer.setAttribute('class', 'tag-container');
+ for (let i = 0; i < data['tags'].length; i++) {
+ let newTag = document.createElement('p');
+ newTag.setAttribute('class','tag');
+ newTag.innerHTML = data['tags'][i]
+ tagContainer.append(newTag)
+ }
+
articleEl.append(img1)
articleEl.append(pMeal)
articleEl.append(pRestaurant)
articleEl.append(div)
+ articleEl.append(tagContainer)
}
diff --git a/source/assets/scripts/localStorage.js b/source/assets/scripts/localStorage.js
new file mode 100644
index 0000000..7495993
--- /dev/null
+++ b/source/assets/scripts/localStorage.js
@@ -0,0 +1,22 @@
+//
+//module.exports = {getReviewsFromStorage, saveReviewsToStorage};
+
+/**
+ * @returns {Array