style: logs viewer scroll bar

This commit is contained in:
jialin
2024-09-14 19:12:29 +08:00
parent b8a20dbf68
commit 0adca93d5c
4 changed files with 16 additions and 18 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ export default function useSize(target: any) {
const [size, setSize] = React.useState();
React.useLayoutEffect(() => {
setSize(target.current.getBoundingClientRect());
setSize(target.current?.getBoundingClientRect());
}, [target]);
useResizeObserver(target, (entry: any) => setSize(entry?.contentRect));