Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +8 -1
templates/index.html
CHANGED
@@ -839,10 +839,13 @@
|
|
839 |
menuItemsList.className = 'menu-items-list';
|
840 |
chatMessages.appendChild(menuItemsList);
|
841 |
} else {
|
842 |
-
// Clear existing items
|
843 |
menuItemsList.innerHTML = '';
|
844 |
}
|
845 |
|
|
|
|
|
|
|
846 |
menuItems.forEach(item => {
|
847 |
const menuItem = document.createElement('div');
|
848 |
menuItem.className = 'menu-item';
|
@@ -868,9 +871,13 @@
|
|
868 |
menuItem.appendChild(button);
|
869 |
menuItemsList.appendChild(menuItem);
|
870 |
});
|
|
|
|
|
|
|
871 |
}
|
872 |
|
873 |
|
|
|
874 |
function displaySelectedIngredients() {
|
875 |
const chatMessages = document.getElementById('chatMessages');
|
876 |
if (!chatMessages) {
|
|
|
839 |
menuItemsList.className = 'menu-items-list';
|
840 |
chatMessages.appendChild(menuItemsList);
|
841 |
} else {
|
842 |
+
// Clear existing items to avoid duplication
|
843 |
menuItemsList.innerHTML = '';
|
844 |
}
|
845 |
|
846 |
+
// Log to verify the dishes being fetched
|
847 |
+
console.log('Fetched menu items:', menuItems);
|
848 |
+
|
849 |
menuItems.forEach(item => {
|
850 |
const menuItem = document.createElement('div');
|
851 |
menuItem.className = 'menu-item';
|
|
|
871 |
menuItem.appendChild(button);
|
872 |
menuItemsList.appendChild(menuItem);
|
873 |
});
|
874 |
+
|
875 |
+
// If there's no issue with the fetch, we expect the dishes to be displayed correctly here.
|
876 |
+
console.log('Menu items displayed');
|
877 |
}
|
878 |
|
879 |
|
880 |
+
|
881 |
function displaySelectedIngredients() {
|
882 |
const chatMessages = document.getElementById('chatMessages');
|
883 |
if (!chatMessages) {
|