From 1dcf61ceb0eb66e57d6352066f3c883fb1d4aa6a Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Tue, 21 Sep 2021 14:00:54 +0100 Subject: [PATCH] fixing terminal toggle --- libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index e42fc6428a..7738c06e84 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -37,7 +37,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { const [newstate, dispatch] = useReducer(registerCommandReducer, initialState) const [cmdHistory, cmdHistoryDispatch] = useReducer(addCommandHistoryReducer, initialState) const [, scriptRunnerDispatch] = useReducer(registerScriptRunnerReducer, initialState) - const [, setIsListeningOnNetwork] = useState(false) + const [isListeningOnNetwork, setIsListeningOnNetwork] = useState(false) const [clearConsole, setClearConsole] = useState(false) const [paste, setPaste] = useState(false) const [autoCompletState, setAutoCompleteState] = useState({ @@ -101,7 +101,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { if (output) scriptRunnerDispatch({ type: 'script', payload: { message: '5' } }) }) }, { activate: true }, dispatch) - }, [autoCompletState.text]) + }, [isListeningOnNetwork, autoCompletState.text]) useEffect(() => { scrollToBottom() @@ -178,14 +178,14 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } } - const handleMinimizeTerminal = (event) => { - event.preventDefault() - event.stopPropagation() + const handleMinimizeTerminal = (e) => { + e.preventDefault() + e.stopPropagation() if (toggleDownUp === 'fa-angle-double-down') { setToggleDownUp('fa-angle-double-up') event.trigger('resize', []) } else { - const terminalTopOffset = config.get('terminal-top-offset') + const terminalTopOffset = config.config.get('terminal-top-offset') event.trigger('resize', [terminalTopOffset]) setToggleDownUp('fa-angle-double-down') }