mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
refactor(PlaygroundLayout): separate templates from problemData
This commit is contained in:
parent
d0118eca65
commit
45cbbc2978
@ -40,12 +40,14 @@ export default async function PlaygroundLayout({
|
|||||||
return notFound();
|
return notFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { templates, ...problemWithoutTemplates } = problemData;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-screen flex flex-col">
|
<div className="h-screen flex flex-col">
|
||||||
<ProblemStoreProvider
|
<ProblemStoreProvider
|
||||||
problemId={id}
|
problemId={id}
|
||||||
problem={problemData}
|
problem={problemWithoutTemplates}
|
||||||
templates={problemData.templates ?? []}
|
templates={templates}
|
||||||
editorLanguageConfigs={editorLanguageConfigs}
|
editorLanguageConfigs={editorLanguageConfigs}
|
||||||
languageServerConfigs={languageServerConfigs}
|
languageServerConfigs={languageServerConfigs}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user