import { useLocale } from '@react-navigation/native'; import * as React from 'react'; import { ScrollView, type ScrollViewProps, StyleSheet } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { DrawerPositionContext } from '../utils/DrawerPositionContext'; type Props = ScrollViewProps & { children: React.ReactNode; }; const SPACING = 12; function DrawerContentScrollViewInner( { contentContainerStyle, style, children, ...rest }: Props, ref?: React.Ref ) { const drawerPosition = React.useContext(DrawerPositionContext); const insets = useSafeAreaInsets(); const { direction } = useLocale(); const isRight = direction === 'rtl' ? drawerPosition === 'left' : drawerPosition === 'right'; return ( {children} ); } export const DrawerContentScrollView = React.forwardRef( DrawerContentScrollViewInner ); const styles = StyleSheet.create({ container: { flex: 1, }, });