mirror of
https://litchi.icu/ngc2207/judge4c-demo.git
synced 2025-05-18 19:36:48 +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="75vh"
|
|
theme="vs-light"
|
|
language="c"
|
|
defaultValue={snippet.code}
|
|
options={{ minimap: { enabled: false } }}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|