mirror of
https://litchi.icu/ngc2207/judge4c-demo.git
synced 2025-05-19 03:56:34 +00:00
23 lines
454 B
TypeScript
23 lines
454 B
TypeScript
|
"use client";
|
||
|
|
||
|
import { Snippet } from "@prisma/client";
|
||
|
import { Editor } from "@monaco-editor/react";
|
||
|
|
||
|
interface SnippetShowFormProps {
|
||
|
snippet: Snippet;
|
||
|
}
|
||
|
|
||
|
export default function SnippetShowForm({ snippet }: SnippetShowFormProps) {
|
||
|
return (
|
||
|
<div>
|
||
|
<Editor
|
||
|
height="40vh"
|
||
|
theme="vs-light"
|
||
|
language="c"
|
||
|
defaultValue={snippet.code}
|
||
|
options={{ minimap: { enabled: false } }}
|
||
|
/>
|
||
|
</div>
|
||
|
);
|
||
|
}
|