Skip to content
Snippets Groups Projects
Commit 0ba24f43 authored by zh393's avatar zh393
Browse files

added logic to display 'No missing ingredients' if no ingredients are misssing

parent 79e58538
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,10 @@ function Results() {
color: "#878282",
}}
>
Missing Ingredients: {recipe.missedIngredients.map(ingredient => ingredient.name).join(", ")}
{recipe.missedIngredientCount > 0 ?
`Missing Ingredients: ${recipe.missedIngredients.map(ingredient => ingredient.name).join(", ")}` :
"No missing ingredients"
}
</Typography>
</Link>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment