Skip to content

Commit

Permalink
Merge pull request #1559 from Anjaliavv51/chinese
Browse files Browse the repository at this point in the history
Added chinese food
  • Loading branch information
sunny0625 authored Aug 7, 2024
2 parents b4391d9 + e23d48f commit 301f063
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Html-files/MenuAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,22 @@ function filterMenu() {
item.style.display = 'none';
}
});
}

async function getMealsByCategory(category) {
if (category.toLowerCase() === 'chinese') {
return [
{ strMeal: "Kung Pao Chicken", strMealThumb: "../Images/chinesefood/image.png", idMeal: "c1" },
{ strMeal: "Mapo Tofu", strMealThumb: "../Images/chinesefood/download (3).jpeg", idMeal: "c2" },
{ strMeal: "Dim Sum", strMealThumb: "../Images/chinesefood/download (4).jpeg", idMeal: "c3" },
{ strMeal: "Peking Duck", strMealThumb: "../Images/chinesefood/download (5).jpeg", idMeal: "c4" },
{ strMeal: "Hot and Sour Soup", strMealThumb: "../Images/chinesefood/download (6).jpeg", idMeal: "c5" },
{ strMeal: "Spring Rolls", strMealThumb: "../Images/chinesefood/download (7).jpeg", idMeal: "c6" },
];
} else {
const url = `https://www.themealdb.com/api/json/v1/1/filter.php?c=${category}`;
const response = await fetch(url);
const data = await response.json();
return data.meals || [];
}
}
Binary file added Images/chinesefood/download (3).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/chinesefood/download (4).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/chinesefood/download (5).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/chinesefood/download (6).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/chinesefood/download (7).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/chinesefood/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 301f063

Please sign in to comment.