Skip to content

Commit f2d1de2

Browse files
committed
paramsをawait
1 parent c5c0261 commit f2d1de2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/[docs_id]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ async function getMarkdownContent(docs_id: string): Promise<string> {
3535
export async function generateMetadata({
3636
params,
3737
}: {
38-
params: { docs_id: string };
38+
params: Promise<{ docs_id: string }>;
3939
}): Promise<Metadata> {
40-
const { docs_id } = params;
40+
const { docs_id } = await params;
4141
const mdContent = await getMarkdownContent(docs_id);
4242
const splitMdContent = splitMarkdown(mdContent);
4343

@@ -57,9 +57,9 @@ export async function generateMetadata({
5757
export default async function Page({
5858
params,
5959
}: {
60-
params: { docs_id: string };
60+
params: Promise<{ docs_id: string }>;
6161
}) {
62-
const { docs_id } = params;
62+
const { docs_id } = await params;
6363

6464
const mdContent = getMarkdownContent(docs_id);
6565
const splitMdContent = mdContent.then((text) => splitMarkdown(text));

0 commit comments

Comments
 (0)