mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(playground): include full problem data in provider
This commit is contained in:
parent
0c9ad2b8b0
commit
288a3cc4c5
@ -30,7 +30,7 @@ export default async function PlaygroundLayout({
|
|||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
prisma.problem.findUnique({
|
prisma.problem.findUnique({
|
||||||
where: { id },
|
where: { id },
|
||||||
select: { templates: true },
|
include: { templates: true },
|
||||||
}),
|
}),
|
||||||
prisma.editorLanguageConfig.findMany(),
|
prisma.editorLanguageConfig.findMany(),
|
||||||
prisma.languageServerConfig.findMany(),
|
prisma.languageServerConfig.findMany(),
|
||||||
@ -44,6 +44,7 @@ export default async function PlaygroundLayout({
|
|||||||
<div className="h-screen flex flex-col">
|
<div className="h-screen flex flex-col">
|
||||||
<ProblemStoreProvider
|
<ProblemStoreProvider
|
||||||
problemId={id}
|
problemId={id}
|
||||||
|
problem={problemData}
|
||||||
templates={problemData.templates ?? []}
|
templates={problemData.templates ?? []}
|
||||||
editorLanguageConfigs={editorLanguageConfigs}
|
editorLanguageConfigs={editorLanguageConfigs}
|
||||||
languageServerConfigs={languageServerConfigs}
|
languageServerConfigs={languageServerConfigs}
|
||||||
|
Loading…
Reference in New Issue
Block a user