From 4e8792cc450e382979507facea354042c6dfa99c Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Tue, 12 Nov 2024 15:11:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=8D=95=E4=B8=AA?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=89=87=E6=AE=B5=E5=B1=95=E7=A4=BA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/snippets/[id]/page.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/snippets/[id]/page.tsx b/src/app/snippets/[id]/page.tsx index 1db2063..ad2f928 100644 --- a/src/app/snippets/[id]/page.tsx +++ b/src/app/snippets/[id]/page.tsx @@ -1,8 +1,10 @@ -export default async function SnippetShowPage({ - params, -}: { - params: Promise<{ id: string }>; -}) { - const id = (await params).id; +interface SnippetShowPageProps { + params: Promise<{ + id: string; + }>; +} + +export default async function SnippetShowPage(props: SnippetShowPageProps) { + const { id } = await props.params; return
Show a snippet: {id}
; }