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 11import PropTypes from 'prop-types' ;
22import React , { useRef , useEffect , useState } from 'react' ;
33import CodeMirror from 'codemirror' ;
4+ import { useDispatch } from 'react-redux' ;
45import { Encode } from 'console-feed' ;
56
67import RightArrowIcon from '../../../images/right-arrow.svg' ;
@@ -15,6 +16,7 @@ function ConsoleInput({ theme, fontSize }) {
1516 const [ commandCursor , setCommandCursor ] = useState ( - 1 ) ;
1617 const codemirrorContainer = useRef ( null ) ;
1718 const cmInstance = useRef ( null ) ;
19+ const dispatch = useDispatch ( ) ;
1820
1921 useEffect ( ( ) => {
2022 cmInstance . current = CodeMirror ( codemirrorContainer . current , {
@@ -45,7 +47,7 @@ function ConsoleInput({ theme, fontSize }) {
4547 payload : { source : 'console' , messages }
4648 } ) ;
4749
48- dispatchConsoleEvent ( consoleEvent ) ;
50+ dispatch ( dispatchConsoleEvent ( consoleEvent ) ) ;
4951 cm . setValue ( '' ) ;
5052 setCommandHistory ( [ value , ...commandHistory ] ) ;
5153 setCommandCursor ( - 1 ) ;
You can’t perform that action at this time.
0 commit comments