mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(playground): add generateStaticParams for problem static generation
This commit is contained in:
parent
45cbbc2978
commit
cc3fb8afc4
@ -75,3 +75,13 @@ export default async function PlaygroundLayout({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function generateStaticParams() {
|
||||||
|
const problems = await prisma.problem.findMany({
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
return problems.map((problem) => ({
|
||||||
|
id: problem.id,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user