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({
|
||||
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 <div>Show a snippet: {id}</div>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user