feat : add metadata for comment page
This commit is contained in:
@@ -11,7 +11,14 @@ export const instant = false;
|
||||
type Props = { params: Promise<{ character: string }> };
|
||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||
const guide = await getCachedPublicGuideSummary((await params).character);
|
||||
return { title: guide ? `${guide.name}` : "ไม่พบไกด์" };
|
||||
return guide
|
||||
? {
|
||||
title: `${guide.name}`,
|
||||
description: guide.overview,
|
||||
openGraph: { images: [guide.coverUrl] },
|
||||
twitter: { images: [guide.coverUrl] },
|
||||
}
|
||||
: { title: "ไม่พบไกด์" };
|
||||
}
|
||||
export default async function GuideCommentPage({ params }: Props) {
|
||||
await connection();
|
||||
|
||||
Reference in New Issue
Block a user