MCPcopy Create free account
hub / github.com/CommE2E/comm / useHeaderHeight

Function useHeaderHeight

native/navigation/use-header-height.react.js:12–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10import { useSelector } from '../redux/redux-utils.js';
11
12function useHeaderHeight(): number {
13 const networkConnected = useSelector(state => state.connectivity.connected);
14 const insets = useSafeAreaInsets();
15 const frame = useSafeAreaFrame();
16 const disconnectedBarHeight = networkConnected ? 0 : expandedHeight;
17
18 return (
19 getDefaultHeaderHeight(frame, false, insets.top) + disconnectedBarHeight
20 );
21}
22
23export { useHeaderHeight };

Calls 1

useSelectorFunction · 0.90

Tested by

no test coverage detected