* Add home guided tour (WIP) * Add web handling of the tour * Switch to our fork of rn-tourguide * Bump guided-tour * Fix alignment on android * Implement home page tour trigger after account creation * Add new_user_guided_tour gate * Add a title line to the tour tooltips * A11y improvements: proper labels, focus capture, scroll capture * Silence type error * Native a11y * Use FocusScope * Switch to useWebBodyScrollLock() --------- Co-authored-by: Eric Bailey <git@esb.lol>
23 lines
552 B
TypeScript
23 lines
552 B
TypeScript
import {useWindowDimensions} from 'react-native'
|
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
|
|
|
import {useShellLayout} from '#/state/shell/shell-layout'
|
|
|
|
export function useHeaderPosition() {
|
|
const {headerHeight} = useShellLayout()
|
|
const {width} = useWindowDimensions()
|
|
const insets = useSafeAreaInsets()
|
|
|
|
return {
|
|
top: insets.top,
|
|
left: 10,
|
|
width: width - 20,
|
|
height: headerHeight.value,
|
|
borderRadiusObject: {
|
|
topLeft: 4,
|
|
topRight: 4,
|
|
bottomLeft: 4,
|
|
bottomRight: 4,
|
|
},
|
|
}
|
|
}
|