Skip to content

Commit

Permalink
feat: Fix dcm display for multi stack scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Oct 8, 2024
1 parent 6a4fe34 commit 75b1eb5
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 219 deletions.
8 changes: 0 additions & 8 deletions src/components/FeedTree/useSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ const useSize = (
// size is of type DOMRectReadOnly or undefined initially
const [size, setSize] = React.useState<DOMRectReadOnly | undefined>();

React.useLayoutEffect(() => {
if (target.current) {
// Safely access getBoundingClientRect() method
const rect = target.current.getBoundingClientRect();
setSize(rect);
}
}, [target]);

useResizeObserver(target, (entry) => setSize(entry.contentRect));

return size;
Expand Down
Loading

0 comments on commit 75b1eb5

Please sign in to comment.