mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +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>
|
||||
);
|
||||
}
|
||||
|
||||
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