fix: food amount

This commit is contained in:
2025-12-10 12:01:08 -03:00
parent 0499e4dc4e
commit 4117c54d24
+4
View File
@@ -367,6 +367,10 @@ const setupEventListeners = () => {
} }
}); });
getInputById('gramAmount').addEventListener('change', () => {
previewCalories();
});
getButtonById('add-food-btn').addEventListener('click', () => { getButtonById('add-food-btn').addEventListener('click', () => {
if (getButtonById('add-food-btn').innerHTML === 'Add Food') { if (getButtonById('add-food-btn').innerHTML === 'Add Food') {
addFood(); addFood();