From 60749eefa7fd8cfe826da87f947414f4993e9139 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Mon, 20 Dec 2021 14:05:22 -0500 Subject: [PATCH] remove console + format --- src/ScriptEditor/ui/ScriptEditorRoot.tsx | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index 3343cd840..181513a7e 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -126,23 +126,23 @@ export function Root(props: IProps): React.ReactElement { }); const [dimensions, setDimensions] = useState({ - height: window.innerHeight, - width: window.innerWidth + height: window.innerHeight, + width: window.innerWidth, }); useEffect(() => { - const debouncedHandleResize = debounce(function handleResize() { - setDimensions({ - height: window.innerHeight, - width: window.innerWidth - }) - }, 250) + const debouncedHandleResize = debounce(function handleResize() { + setDimensions({ + height: window.innerHeight, + width: window.innerWidth, + }); + }, 250); - window.addEventListener('resize', debouncedHandleResize) + window.addEventListener("resize", debouncedHandleResize); - return () => { - window.removeEventListener('resize', debouncedHandleResize) - - }}, []) + return () => { + window.removeEventListener("resize", debouncedHandleResize); + }; + }, []); useEffect(() => { // Save currentScript @@ -662,7 +662,6 @@ export function Root(props: IProps): React.ReactElement { // 44px bottom tool bar + 16px margin // + vim bar 34px const editorHeight = dimensions.height - (112 + (options.vim ? 34 : 0)); - console.log({editorHeight}) return ( <>