Skip to content

Commit 38ac8d4

Browse files
committed
update in useEffect
1 parent 8b35b97 commit 38ac8d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

forms-flow-nav/src/root.component.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ export default function Root(props) {
3939
}, []);
4040

4141
useEffect(() => {
42-
const headerHeight = headerRef.current?.offsetHeight || 0;
43-
const totalHeight = `calc(100% - ${headerHeight}px)`;
44-
setSidenavHeight(totalHeight);
4542
if (hasMultitenancyHeader) {
4643
StyleServices?.setCSSVariable("--client-nav", "3rem");
4744
}
45+
const headerHeight = headerRef.current?.offsetHeight || 0;
46+
const totalHeight = `calc(100% - ${headerHeight}px)`;
47+
console.log(totalHeight);
48+
setSidenavHeight(totalHeight);
4849
}, [ hasMultitenancyHeader ]);
4950

5051
return (

0 commit comments

Comments
 (0)