mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
remove console + format
This commit is contained in:
parent
ee177393fa
commit
60749eefa7
@ -126,23 +126,23 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const [dimensions, setDimensions] = useState({
|
const [dimensions, setDimensions] = useState({
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
width: window.innerWidth
|
width: window.innerWidth,
|
||||||
});
|
});
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const debouncedHandleResize = debounce(function handleResize() {
|
const debouncedHandleResize = debounce(function handleResize() {
|
||||||
setDimensions({
|
setDimensions({
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
width: window.innerWidth
|
width: window.innerWidth,
|
||||||
})
|
});
|
||||||
}, 250)
|
}, 250);
|
||||||
|
|
||||||
window.addEventListener('resize', debouncedHandleResize)
|
window.addEventListener("resize", debouncedHandleResize);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('resize', debouncedHandleResize)
|
window.removeEventListener("resize", debouncedHandleResize);
|
||||||
|
};
|
||||||
}}, [])
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Save currentScript
|
// Save currentScript
|
||||||
@ -662,7 +662,6 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
// 44px bottom tool bar + 16px margin
|
// 44px bottom tool bar + 16px margin
|
||||||
// + vim bar 34px
|
// + vim bar 34px
|
||||||
const editorHeight = dimensions.height - (112 + (options.vim ? 34 : 0));
|
const editorHeight = dimensions.height - (112 + (options.vim ? 34 : 0));
|
||||||
console.log({editorHeight})
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user