fix: make some changes
All checks were successful
Deploy to SFTP Server / build (push) Successful in 17m9s
All checks were successful
Deploy to SFTP Server / build (push) Successful in 17m9s
This commit is contained in:
@@ -14,7 +14,7 @@ export async function getStaticPaths() {
|
||||
const paths = await Promise.all(
|
||||
resourceTypes.map(async (resourceType) => {
|
||||
const resources = await memorium.listResource(resourceType.id);
|
||||
return resources?.content.map((res: any) => {
|
||||
return resources?.content?.map((res: any) => {
|
||||
return {
|
||||
params: {
|
||||
resourceType: resourceType.id,
|
||||
@@ -34,6 +34,9 @@ export async function getStaticPaths() {
|
||||
const resource = await memorium.listResource(
|
||||
`${resourceType}/${resourceName}.md`,
|
||||
);
|
||||
|
||||
const ingredients = resource?.content?.recipeIngredient || [];
|
||||
const instructions = resource?.content?.recipeInstructions || [];
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
@@ -59,7 +62,7 @@ const resource = await memorium.listResource(
|
||||
<h2>Ingredients</h2>
|
||||
<ul>
|
||||
{
|
||||
resource?.content?.recipeIngredient.map((ingredient) => (
|
||||
ingredients.map((ingredient) => (
|
||||
<li>{markdownToText(ingredient)}</li>
|
||||
))
|
||||
}
|
||||
@@ -68,7 +71,7 @@ const resource = await memorium.listResource(
|
||||
<h2>Steps</h2>
|
||||
<ol>
|
||||
{
|
||||
resource?.content?.recipeInstructions.map((ingredient) => (
|
||||
instructions.map((ingredient) => (
|
||||
<li>{markdownToText(ingredient)}</li>
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user