🐛 fix console not opening/closing
This commit is contained in:
parent
928595cb27
commit
556c9d15fe
1 changed files with 4 additions and 15 deletions
|
@ -95,27 +95,16 @@ const Console = () => {
|
||||||
useDidUpdate(() => {
|
useDidUpdate(() => {
|
||||||
clearConsole();
|
clearConsole();
|
||||||
dispatchConsoleEvent(consoleEvents);
|
dispatchConsoleEvent(consoleEvents);
|
||||||
}, [theme, fontSize]); //
|
}, [theme, fontSize]);
|
||||||
|
|
||||||
// const [consoleMessages, setConsoleMessages] = useState({});
|
const cm = useRef({});
|
||||||
// this.consoleMessages.scrollTop = this.consoleMessages.scrollHeight;
|
|
||||||
|
|
||||||
// const clearConsole = () => {};
|
|
||||||
// const collapseConsole = () => {};
|
|
||||||
// const expandConsole = () => {};
|
|
||||||
|
|
||||||
// const isExpanded = true;
|
|
||||||
// const fontSize = 16;
|
|
||||||
// const theme = {};
|
|
||||||
|
|
||||||
// // 2. FIXME: Console is not opening/closing, and I suspect it has to do with this
|
// // 2. FIXME: Console is not opening/closing, and I suspect it has to do with this
|
||||||
const cm = useRef({});
|
useDidUpdate(() => { cm.current.scrollTop = cm.current.scrollHeight; });
|
||||||
useDidUpdate(() => { if (cm.current) cm.current.scrollTop = cm.current.scrollHeight; });
|
|
||||||
|
|
||||||
|
|
||||||
const consoleClass = classNames({
|
const consoleClass = classNames({
|
||||||
'preview-console': true,
|
'preview-console': true,
|
||||||
'preview-console--collapsed': isExpanded
|
'preview-console--collapsed': !isExpanded
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue