feat: 添加代码片段加载页面并实现延迟加载

This commit is contained in:
ngc2207 2024-11-12 15:31:05 +08:00
parent 55bb2c7883
commit 8a91e46c4f
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,3 @@
export default function SnippetShowLoadingPage() {
return <div>Loading...</div>;
}

View File

@ -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: {