From 8a91e46c4feae5346a34ecf0b99d80289e4454b7 Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Tue, 12 Nov 2024 15:31:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=89=87=E6=AE=B5=E5=8A=A0=E8=BD=BD=E9=A1=B5=E9=9D=A2=E5=B9=B6?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=BB=B6=E8=BF=9F=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/snippets/[id]/loading.tsx | 3 +++ src/app/snippets/[id]/page.tsx | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 src/app/snippets/[id]/loading.tsx diff --git a/src/app/snippets/[id]/loading.tsx b/src/app/snippets/[id]/loading.tsx new file mode 100644 index 0000000..0c8dd50 --- /dev/null +++ b/src/app/snippets/[id]/loading.tsx @@ -0,0 +1,3 @@ +export default function SnippetShowLoadingPage() { + return
Loading...
; +} diff --git a/src/app/snippets/[id]/page.tsx b/src/app/snippets/[id]/page.tsx index 5280a77..63eb10e 100644 --- a/src/app/snippets/[id]/page.tsx +++ b/src/app/snippets/[id]/page.tsx @@ -8,6 +8,8 @@ interface SnippetShowPageProps { } export default async function SnippetShowPage(props: SnippetShowPageProps) { + await new Promise((r) => setTimeout(r, 2000)); + const params = await props.params; const snippet = await db.snippet.findFirst({ where: {