From 39cd121125b6a81b64b399ca0a502deb82ae0786 Mon Sep 17 00:00:00 2001 From: lerte smith Date: Thu, 17 Oct 2024 14:08:00 +0800 Subject: [PATCH] fix types --- apps/docs/src/app/(docs)/[...slug]/page.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/docs/src/app/(docs)/[...slug]/page.tsx b/apps/docs/src/app/(docs)/[...slug]/page.tsx index e5f64ed..dd897a7 100644 --- a/apps/docs/src/app/(docs)/[...slug]/page.tsx +++ b/apps/docs/src/app/(docs)/[...slug]/page.tsx @@ -5,13 +5,11 @@ import TableOfContents from '@/components/TableOfContents' import { getFileRaw } from '@/lib/raw' type PageProps = { - params: { - slug: string[] - } + params: Promise<{ slug: string[] }> } export const generateMetadata = async (props: PageProps) => { - const params = await props.params; + const params = await props.params const { slug } = params const docs = getDocData(slug) @@ -27,7 +25,7 @@ export async function generateStaticParams() { } export default async function PageLayout(props: PageProps) { - const params = await props.params; + const params = await props.params const { slug } = params const docs = getDocData(slug)