fix design bug
This commit is contained in:
@@ -115,10 +115,17 @@ const MenuIndex = () => {
|
||||
!search || itemName.toLowerCase().includes(lowerSearch);
|
||||
|
||||
const matchesIngredients = !selectedIngredients ||
|
||||
(item.content && Array.isArray(item.content) &&
|
||||
item.content.some((content: string) =>
|
||||
content.toLowerCase().includes(lowerIngredients)
|
||||
));
|
||||
(() => {
|
||||
// ابتدا در محتویات جستجو میکنیم
|
||||
if (item.content && Array.isArray(item.content) && item.content.length > 0) {
|
||||
return item.content.some((content: string) =>
|
||||
content.toLowerCase().includes(lowerIngredients)
|
||||
);
|
||||
}
|
||||
// اگر محتویات وجود نداشت یا خالی بود، در توضیحات جستجو میکنیم
|
||||
const description = item.description || item.desc || "";
|
||||
return description.toLowerCase().includes(lowerIngredients);
|
||||
})();
|
||||
|
||||
const matchesDelivery = selectedDeliveryId === "0" ||
|
||||
(selectedDeliveryId === "pickup" && item.pickupServe) ||
|
||||
|
||||
Reference in New Issue
Block a user