feat(page): Implement problem preview and code editor layout

This commit splits the home page into two halves:

- The left half displays a preview of the problem description using the `MdxPreview` component.
- The right half provides a code editor using the `CodeEditor` component.

This improves the user experience by allowing users to view the problem description and write code simultaneously.
This commit is contained in:
cfngc4594 2025-02-21 00:10:31 +08:00
parent 17894b6e96
commit 1142cb950f

View File

@ -1,5 +1,16 @@
import CodeEditor from "@/components/code-editor";
import { DEFAULT_PROBLEM } from "@/config/problem";
import MdxPreview from "@/components/problem-description";
export default function Home() {
return <CodeEditor />;
return (
<div className="h-full flex items-center">
<div className="h-full w-1/2">
<MdxPreview source={DEFAULT_PROBLEM} />
</div>
<div className="h-full w-1/2">
<CodeEditor />
</div>
</div>
)
}