This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
export async function listResource(id: string): Promise<any[]> {
|
export async function listResource(id: string): Promise<any[]> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`http://localhost:8080/${id}`,
|
`https://marka.max-richter.dev/${id}`,
|
||||||
);
|
);
|
||||||
return await response.json();
|
return await response.json();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@@ -8,17 +8,25 @@ const recipes = await memorium.listResource("Recipes");
|
|||||||
|
|
||||||
<Layout title="Max Richter">
|
<Layout title="Max Richter">
|
||||||
{
|
{
|
||||||
recipes.content.filter(res => res.content).map((recipe: any) => (
|
recipes.content
|
||||||
|
.filter((res) => res.content)
|
||||||
|
.map((recipe: any) => (
|
||||||
<HeroCard
|
<HeroCard
|
||||||
post={{
|
post={{
|
||||||
collection: "resources/Recipes",
|
collection: "resources/Recipes",
|
||||||
id: recipe.name.replace(/\.md$/, ""),
|
id: recipe.name.replace(/\.md$/, ""),
|
||||||
data: {
|
data: {
|
||||||
cover: recipe.content?.image ? `http://localhost:8080/${recipe.content.image}` : undefined,
|
cover: recipe.content?.image
|
||||||
|
? `http://localhost:8080/${recipe.content.image}`
|
||||||
|
: undefined,
|
||||||
title: recipe.name.replace(/\.md$/, ""),
|
title: recipe.name.replace(/\.md$/, ""),
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
</Layout>
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
}
|
||||||
</Layout>
|
</Layout>
|
||||||
|
Reference in New Issue
Block a user