mirror of
https://litchi.icu/ngc2207/judge4c-demo.git
synced 2025-05-18 12:48:02 +00:00
feat: 优化单个代码片段展示页面参数处理
This commit is contained in:
parent
58a12e7042
commit
4e8792cc45
@ -1,8 +1,10 @@
|
|||||||
export default async function SnippetShowPage({
|
interface SnippetShowPageProps {
|
||||||
params,
|
params: Promise<{
|
||||||
}: {
|
id: string;
|
||||||
params: Promise<{ id: string }>;
|
}>;
|
||||||
}) {
|
}
|
||||||
const id = (await params).id;
|
|
||||||
|
export default async function SnippetShowPage(props: SnippetShowPageProps) {
|
||||||
|
const { id } = await props.params;
|
||||||
return <div>Show a snippet: {id}</div>;
|
return <div>Show a snippet: {id}</div>;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user