[PIE-28] Switch to type-safe API (#12)
Custom API client to handle a lot of the more type safe queries Reviewed-on: #12 Co-authored-by: june <self@breadone.net> Co-committed-by: june <self@breadone.net>
This commit was merged in pull request #12.
This commit is contained in:
@@ -4,8 +4,7 @@ import TagRow from "./TagRow.astro"
|
||||
|
||||
const { recipe } = Astro.props;
|
||||
|
||||
const headerImage = await client.collection("images").getOne(recipe.images[0])
|
||||
const image = await client.files.getRelativeURL(headerImage, headerImage.image)
|
||||
const image = (await client.getRecipeImages(recipe.id))[0]
|
||||
---
|
||||
|
||||
<div class="relative z-0 flex h-50">
|
||||
@@ -19,7 +18,7 @@ const image = await client.files.getRelativeURL(headerImage, headerImage.image)
|
||||
<!-- <p id="recipe-desc" class="text-white text-[10pt]"> {recipe.description} </p> -->
|
||||
|
||||
<div id="tag-row" class="">
|
||||
<TagRow tagIds={recipe.tags}/>
|
||||
<TagRow tags={recipe.expand.tags}/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user