mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-12-14 20:45:41 +00:00
16 lines
399 B
TypeScript
16 lines
399 B
TypeScript
|
|
"use client";
|
||
|
|
|
||
|
|
import { useMemo } from 'react';
|
||
|
|
import MdxPreview from "@/components/mdx-preview";
|
||
|
|
import { useCodeEditorState } from "@/store/useCodeEditor";
|
||
|
|
|
||
|
|
export default function ProblemSubmissionPage() {
|
||
|
|
const { result } = useCodeEditorState();
|
||
|
|
|
||
|
|
const template = useMemo(() => {
|
||
|
|
return `\`\`\`bash\n${result || ""}\`\`\``;
|
||
|
|
}, [result]);
|
||
|
|
|
||
|
|
return <MdxPreview source={template} />;
|
||
|
|
}
|