Skip to content

Commit 75b1eb5

Browse files
committed
feat: Fix dcm display for multi stack scroll
1 parent 6a4fe34 commit 75b1eb5

File tree

4 files changed

+256
-219
lines changed

4 files changed

+256
-219
lines changed

src/components/FeedTree/useSize.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ const useSize = (
99
// size is of type DOMRectReadOnly or undefined initially
1010
const [size, setSize] = React.useState<DOMRectReadOnly | undefined>();
1111

12-
React.useLayoutEffect(() => {
13-
if (target.current) {
14-
// Safely access getBoundingClientRect() method
15-
const rect = target.current.getBoundingClientRect();
16-
setSize(rect);
17-
}
18-
}, [target]);
19-
2012
useResizeObserver(target, (entry) => setSize(entry.contentRect));
2113

2214
return size;

0 commit comments

Comments
 (0)