fix: make recipe ingredinets interactive
This commit is contained in:
@@ -43,13 +43,13 @@ const Ingredient = (
|
||||
|
||||
return (
|
||||
<tr key={key}>
|
||||
<td class="pr-4 py-2">
|
||||
<td class="pr-4 py-1">
|
||||
{formatAmount(finalAmount || 0)}
|
||||
<span class="ml-0.5 opacity-50">
|
||||
{formatUnit(unit, finalAmount || 0)}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-2">{name}</td>
|
||||
<td class="px-4 py-1">{name}</td>
|
||||
</tr>
|
||||
);
|
||||
};
|
||||
@@ -66,14 +66,10 @@ export const IngredientsList: FunctionalComponent<
|
||||
return (
|
||||
<table class="w-full border-collapse table-auto">
|
||||
<tbody>
|
||||
{ingredients.filter((s) => !!s?.length).map((item) => {
|
||||
{ingredients.map((item) => {
|
||||
return (
|
||||
<div dangerouslySetInnerHTML={{ __html: renderMarkdown(item) }}>
|
||||
</div>
|
||||
<Ingredient ingredient={item} amount={amount} portion={portion} />
|
||||
);
|
||||
// return (
|
||||
// <Ingredient ingredient={item} amount={amount} portion={portion} />
|
||||
// );
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user