mirror of
https://litchi.icu/ngc2207/judge4c-demo.git
synced 2025-05-18 13:48:01 +00:00
feat: 添加代码片段加载页面并实现延迟加载
This commit is contained in:
parent
55bb2c7883
commit
8a91e46c4f
3
src/app/snippets/[id]/loading.tsx
Normal file
3
src/app/snippets/[id]/loading.tsx
Normal file
@ -0,0 +1,3 @@
|
||||
export default function SnippetShowLoadingPage() {
|
||||
return <div>Loading...</div>;
|
||||
}
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user