Skip to content

Commit

Permalink
クイズページにdescriptionを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
eatski committed Aug 11, 2024
1 parent 336ffc1 commit 12cc3c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/app/stories/[storyId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ export const generateMetadata = async ({
}: StoryProps): Promise<Metadata> => {
const session = await getUserSession();
const story = await getStoryByRequest(storyId, session?.userId || null);
const title = `${story.title} - ${brand.serviceDescription}`;
const description = story.quiz;
return {
title: `${story.title} - ${brand.serviceNickname}`,
description: story.quiz,
title,
description,
openGraph: {
title,
description,
},
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/common/texts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const brand = {
"AIとウミガメのスープを楽しめる水平思考クイズの投稿サイト",
serviceDescriptionLong:
"AIとウミガメのスープを楽しめる水平思考クイズの投稿サイトです。当サイトではAIが回答を生成するため、一人でも、もしくは真相を知らない友人同士とでも水平思考クイズで遊んでいただけます。",
};
} as const;

0 comments on commit 12cc3c6

Please sign in to comment.