mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
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:
parent
17894b6e96
commit
1142cb950f
@ -1,5 +1,16 @@
|
|||||||
import CodeEditor from "@/components/code-editor";
|
import CodeEditor from "@/components/code-editor";
|
||||||
|
import { DEFAULT_PROBLEM } from "@/config/problem";
|
||||||
|
import MdxPreview from "@/components/problem-description";
|
||||||
|
|
||||||
export default function Home() {
|
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>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user