'use client'; import React, { useState } from 'react'; import { Editor as Monaco } from '@monaco-editor/react'; import { useTheme } from 'next-themes'; import { Button } from '@nextui-org/react'; import { HiOutlineClipboardDocumentList } from 'react-icons/hi2'; import { toast } from 'react-toastify'; type Props = { language: string, defaultValue: string } const MonacoEditor = (props: Props) => { const { theme } = useTheme(); const [ editorValue, setEditorValue ] = useState(props.defaultValue); console.log(editorValue); return (