--- import client from "@/data/pocketbase"; import SiteLayout from "@/layouts/base"; import ImageCarousel from "@/components/Detail/ImageCarousel"; import IngredientTableView from "@/components/Detail/IngredientTableView"; import StepView from "@/components/Detail/StepView"; import InfoView from "@/components/Detail/InfoView"; const { recipeid } = Astro.params; const re = await client.collection("recipes").getOne(recipeid ?? "0"); const stepIds = re.steps let steps = await Promise.all( stepIds.map(async s => await client.collection("steps").getOne(s) ) ) steps = steps.sort((a, b) => a.index - b.index); const ingredients = await Promise.all( re.ingredients.map(async s => await client.collection("ingredients").getOne(s) ) ) ---

{re.name}

Ingredients