File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
client/modules/IDE/components Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
import PropTypes from 'prop-types' ;
2
2
import React , { useRef , useEffect , useState } from 'react' ;
3
3
import CodeMirror from 'codemirror' ;
4
+ import { useDispatch } from 'react-redux' ;
4
5
import { Encode } from 'console-feed' ;
5
6
6
7
import RightArrowIcon from '../../../images/right-arrow.svg' ;
@@ -15,6 +16,7 @@ function ConsoleInput({ theme, fontSize }) {
15
16
const [ commandCursor , setCommandCursor ] = useState ( - 1 ) ;
16
17
const codemirrorContainer = useRef ( null ) ;
17
18
const cmInstance = useRef ( null ) ;
19
+ const dispatch = useDispatch ( ) ;
18
20
19
21
useEffect ( ( ) => {
20
22
cmInstance . current = CodeMirror ( codemirrorContainer . current , {
@@ -45,7 +47,7 @@ function ConsoleInput({ theme, fontSize }) {
45
47
payload : { source : 'console' , messages }
46
48
} ) ;
47
49
48
- dispatchConsoleEvent ( consoleEvent ) ;
50
+ dispatch ( dispatchConsoleEvent ( consoleEvent ) ) ;
49
51
cm . setValue ( '' ) ;
50
52
setCommandHistory ( [ value , ...commandHistory ] ) ;
51
53
setCommandCursor ( - 1 ) ;
You can’t perform that action at this time.
0 commit comments