remove some other console.log
continuous-integration/drone/push Build is passing Details

pull/24/head
Rayhân HASSOU 1 year ago
parent 671257da20
commit 9067c71700

@ -119,20 +119,15 @@ export default function RecipeDetails({ route }) {
function getImageForRecipe(recipeName: string) { function getImageForRecipe(recipeName: string) {
const categories = []; const categories = [];
console.log("NAAAAAME : " + recipeName)
for (const [category, words] of Object.entries(imagesDictionary)) { for (const [category, words] of Object.entries(imagesDictionary)) {
const matchedWords = words.filter((word) => recipeName.toLowerCase().includes(word)); const matchedWords = words.filter((word) => recipeName.toLowerCase().includes(word));
console.log("Matched Word : " + matchedWords)
if (matchedWords.length > 0) { if (matchedWords.length > 0) {
categories.push(category); categories.push(category);
console.log(category)
} }
} }
console.log("ON ENTRE DANS LA 2EME FONCTION");
const categoryName = getCategoryFromList(categories); const categoryName = getCategoryFromList(categories);
console.log("CategoryName à la fin : " + categoryName);
switch (categoryName) { switch (categoryName) {
case 'meat': case 'meat':
@ -179,7 +174,6 @@ export default function RecipeDetails({ route }) {
const loadRecipe = async () => { const loadRecipe = async () => {
try { try {
const recipe = await recipesService.getRecipeById(recipeId); const recipe = await recipesService.getRecipeById(recipeId);
console.log("Recipe.name: "+recipe.name)
setResponse(recipe); setResponse(recipe);
} catch (error) { } catch (error) {
console.log(error); console.log(error);

Loading…
Cancel
Save