Skip to content

Commit 96e3804

Browse files
committed
add back in consoleinput changes
1 parent 9a72bfb commit 96e3804

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/modules/IDE/components/ConsoleInput.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React, { useRef, useEffect, useState } from 'react';
33
import CodeMirror from 'codemirror';
4+
import { useDispatch } from 'react-redux';
45
import { Encode } from 'console-feed';
56

67
import 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);

0 commit comments

Comments
 (0)