diff --git a/web/src/app/(main)/p/[id]/page.tsx b/web/src/app/(main)/p/[id]/page.tsx index 27466e3..e3470ab 100644 --- a/web/src/app/(main)/p/[id]/page.tsx +++ b/web/src/app/(main)/p/[id]/page.tsx @@ -3,12 +3,13 @@ import { cookies } from 'next/headers' import BlogPost from '@/components/blog-post/blog-post' // 这个是approuter固定的传入格式,无法更改 -interface PostPageProps { - params: { id: string } +interface Props { + params: Promise<{ id: string }> } -export default async function PostPage({ params }: PostPageProps) { + +export default async function PostPage({ params }: Props) { const cookieStore = await cookies(); - const { id } = params; + const { id } = await params; const post = await getPostById({id, token: cookieStore.get('token')?.value || ''}); if (!post) return
文章不存在