Update page.tsx

This commit is contained in:
Riccardo Giorato
2025-12-26 22:09:34 +01:00
parent a719bd69ad
commit b64efc71f6
+5 -1
View File
@@ -19,12 +19,15 @@ export async function generateMetadata({
};
}
const { story } = result;
const { story, pages } = result;
const title = `${story.title} | MakeComics`;
const description =
story.description ||
`${story.title} - Create your own comic book with MakeComics`;
// Use the first page's image as the Open Graph image, or default if none
const firstPageImage = pages.length > 0 && pages[0].generatedImageUrl ? pages[0].generatedImageUrl : "/placeholder.jpg";
return {
title,
description,
@@ -32,6 +35,7 @@ export async function generateMetadata({
title,
description,
type: "website",
images: [firstPageImage],
},
};
} catch (error) {