From 10a0c7ab9964f84851078cba8bc30062f8519209 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sat, 1 Mar 2025 22:29:14 +0800 Subject: [PATCH] feat(playground): add submission page for displaying code execution results --- .../playground/@problem/@submission/page.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/app/(app)/playground/@problem/@submission/page.tsx diff --git a/src/app/(app)/playground/@problem/@submission/page.tsx b/src/app/(app)/playground/@problem/@submission/page.tsx new file mode 100644 index 0000000..80808e5 --- /dev/null +++ b/src/app/(app)/playground/@problem/@submission/page.tsx @@ -0,0 +1,15 @@ +"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 ; +}