feat: enable english seach terms

This commit is contained in:
2025-12-01 18:15:09 -03:00
parent c0489dd5e8
commit ae7d5aa5b5
3 changed files with 116 additions and 114 deletions
+2 -1
View File
@@ -497,8 +497,9 @@ const setupEventListeners = () => {
function performSearch(query: string) {
const results: FoodItem[] = foodDatabase.filter(food => {
const cleanName = getCleanName(food.name);
const cleanNameEn = getCleanName(food.nameEn);
const category = food.info.category.toLowerCase();
return cleanName.includes(query.toLowerCase()) || category.includes(query.toLowerCase())
return cleanName.includes(query.toLowerCase()) || cleanNameEn.includes(query.toLowerCase()) || category.includes(query.toLowerCase())
}).slice(0, 5); // Limit to 5 results
appState.searchResults = results;