diff --git a/UI/assets/js/products.js b/UI/assets/js/products.js index af108c3..8dbed13 100644 --- a/UI/assets/js/products.js +++ b/UI/assets/js/products.js @@ -7,12 +7,12 @@ const getProducts = () => { }) .then(res => res.json()) .then((data) => { - let output = null; + let output; data.forEach((user) => { console.log(user.productimage); - output += ` + output = `
-
+
@@ -24,8 +24,9 @@ const getProducts = () => {
`; + document.getElementById('products-list').innerHTML += output; }); - document.getElementById('products-list').innerHTML = output; + document.getElementById('products-list').innerHTML += ''; }); }; diff --git a/UI/pages/products.html b/UI/pages/products.html index 885fd95..9829fbf 100644 --- a/UI/pages/products.html +++ b/UI/pages/products.html @@ -45,99 +45,7 @@
- +