Add ingredients to each step in detailview, add tags, and some refactoring and smaller improvements Reviewed-on: #8 Co-authored-by: june <self@breadone.net> Co-committed-by: june <self@breadone.net>
This commit was merged in pull request #8.
This commit is contained in:
17
src/components/Detail/StepIngredientSideView.astro
Normal file
17
src/components/Detail/StepIngredientSideView.astro
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
import client from "@/data/pocketbase";
|
||||
|
||||
const { ingredients, class: className } = Astro.props;
|
||||
|
||||
const ings = await Promise.all(
|
||||
ingredients.map(async i => await client.collection("ingredients").getOne(i))
|
||||
)
|
||||
---
|
||||
|
||||
<div class={className}>
|
||||
{ings.map(i => (
|
||||
<div>
|
||||
<p>• {i.quantity} {i.unit || " "} {i.name}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
Reference in New Issue
Block a user