Skip to content

Commit

Permalink
add back in consoleinput changes
Browse files Browse the repository at this point in the history
  • Loading branch information
raclim committed Dec 3, 2024
1 parent 9a72bfb commit 96e3804
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/modules/IDE/components/ConsoleInput.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React, { useRef, useEffect, useState } from 'react';
import CodeMirror from 'codemirror';
import { useDispatch } from 'react-redux';
import { Encode } from 'console-feed';

import RightArrowIcon from '../../../images/right-arrow.svg';
Expand All @@ -15,6 +16,7 @@ function ConsoleInput({ theme, fontSize }) {
const [commandCursor, setCommandCursor] = useState(-1);
const codemirrorContainer = useRef(null);
const cmInstance = useRef(null);
const dispatch = useDispatch();

useEffect(() => {
cmInstance.current = CodeMirror(codemirrorContainer.current, {
Expand Down Expand Up @@ -45,7 +47,7 @@ function ConsoleInput({ theme, fontSize }) {
payload: { source: 'console', messages }
});

dispatchConsoleEvent(consoleEvent);
dispatch(dispatchConsoleEvent(consoleEvent));
cm.setValue('');
setCommandHistory([value, ...commandHistory]);
setCommandCursor(-1);
Expand Down

0 comments on commit 96e3804

Please sign in to comment.