Skip to content

Commit 42b4c95

Browse files
committed
Update useObserveHeights.ts
1 parent b153c0b commit 42b4c95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/main/src/internal/useObserveHeights.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const useObserveHeights = (
5454
if (headerContentRef.current && headerCollapsed !== undefined) {
5555
setHeaderContentHeight(headerContentRef.current.getBoundingClientRect().height);
5656
}
57-
}, [headerCollapsed, headerContentRef]);
57+
}, [headerCollapsed]);
5858

5959
useEffect(() => {
6060
const page = pageRef.current;
@@ -64,7 +64,7 @@ export const useObserveHeights = (
6464
return () => {
6565
page.removeEventListener('scroll', onScroll);
6666
};
67-
}, [onScroll, fixedHeader, preserveHeaderStateOnScroll, pageRef]);
67+
}, [onScroll, fixedHeader, preserveHeaderStateOnScroll]);
6868

6969
// top header
7070
useEffect(() => {
@@ -78,7 +78,7 @@ export const useObserveHeights = (
7878
return () => {
7979
headerContentResizeObserver.disconnect();
8080
};
81-
}, [topHeaderRef]);
81+
}, []);
8282

8383
// header content
8484
useEffect(() => {
@@ -95,7 +95,7 @@ export const useObserveHeights = (
9595
return () => {
9696
headerContentResizeObserver.disconnect();
9797
};
98-
}, [isIntersecting, fixedHeader, headerContentRef]);
98+
}, [isIntersecting, fixedHeader]);
9999
const totalHeaderHeight = noHeader ? 0 : topHeaderHeight + headerContentHeight;
100100

101101
return { topHeaderHeight, headerContentHeight, totalHeaderHeight, headerCollapsed };

0 commit comments

Comments
 (0)