🐛 fix console not opening/closing

This commit is contained in:
ghalestrilo 2020-07-20 19:02:30 -03:00
parent 928595cb27
commit 556c9d15fe

View file

@ -95,27 +95,16 @@ const Console = () => {
useDidUpdate(() => {
clearConsole();
dispatchConsoleEvent(consoleEvents);
}, [theme, fontSize]); //
}, [theme, fontSize]);
// const [consoleMessages, setConsoleMessages] = useState({});
// this.consoleMessages.scrollTop = this.consoleMessages.scrollHeight;
// const clearConsole = () => {};
// const collapseConsole = () => {};
// const expandConsole = () => {};
// const isExpanded = true;
// const fontSize = 16;
// const theme = {};
const cm = useRef({});
// // 2. FIXME: Console is not opening/closing, and I suspect it has to do with this
const cm = useRef({});
useDidUpdate(() => { if (cm.current) cm.current.scrollTop = cm.current.scrollHeight; });
useDidUpdate(() => { cm.current.scrollTop = cm.current.scrollHeight; });
const consoleClass = classNames({
'preview-console': true,
'preview-console--collapsed': isExpanded
'preview-console--collapsed': !isExpanded
});
return (