@@ -2,11 +2,9 @@ import React, { memo, useRef, useEffect } from 'react';
22
33import MonacoEditor from '@monaco-editor/react' ;
44import { initVimMode } from 'monaco-vim' ;
5- import PropTypes from 'prop-types' ;
65
76import '../initEditor' ;
87import languages from '../config/languages' ;
9- import { actions } from '../slices' ;
108import useEditor from '../utils/useEditor' ;
119
1210import EditorLoading from './EditorLoading' ;
@@ -19,12 +17,6 @@ function Editor(props) {
1917 theme,
2018 loading = false ,
2119 mode,
22- wordWrap = 'off' ,
23- lineNumbers = 'on' ,
24- fontSize = 16 ,
25- mute = true ,
26- editable = false ,
27- toggleMuteSound = actions . toggleMuteSound ,
2820 } = props ;
2921
3022 // Map your custom language key to an actual Monaco recognized language
@@ -104,23 +96,4 @@ function Editor(props) {
10496 ) ;
10597}
10698
107- Editor . propTypes = {
108- value : PropTypes . string . isRequired ,
109- syntax : PropTypes . string ,
110- onChange : PropTypes . func . isRequired ,
111- theme : PropTypes . string . isRequired ,
112- mode : PropTypes . string . isRequired ,
113- loading : PropTypes . bool ,
114- wordWrap : PropTypes . string ,
115- lineNumbers : PropTypes . string ,
116- fontSize : PropTypes . number ,
117- editable : PropTypes . bool ,
118- roomMode : PropTypes . string . isRequired ,
119- checkResult : PropTypes . func . isRequired ,
120- toggleMuteSound : PropTypes . func ,
121- mute : PropTypes . bool ,
122- userType : PropTypes . string . isRequired ,
123- userId : PropTypes . number . isRequired ,
124- } ;
125-
12699export default memo ( Editor ) ;
0 commit comments