diff --git a/native/bottom-sheets/bottom-sheet.react.js b/native/bottom-sheets/bottom-sheet.react.js index f86c2af49..e1217ccb6 100644 --- a/native/bottom-sheets/bottom-sheet.react.js +++ b/native/bottom-sheets/bottom-sheet.react.js @@ -1,67 +1,58 @@ // @flow import { BottomSheetModal } from '@gorhom/bottom-sheet'; import * as React from 'react'; import BottomSheetBackdrop from './bottom-sheet-backdrop.react.js'; import BottomSheetHandle from './bottom-sheet-handle.react.js'; import { useStyles } from '../themes/colors.js'; type Props = { +children: React.Node, +onClosed: () => mixed, }; function ForwardedBottomSheet( props: Props, ref: React.Ref, ): React.Node { const { children, onClosed } = props; const styles = useStyles(unboundStyles); const snapPoints = React.useMemo(() => ['25%', '50%'], []); - const onChange = React.useCallback( - (index: number) => { - if (index === -1) { - onClosed(); - } - }, - [onClosed], - ); - return ( {children} ); } const unboundStyles = { background: { backgroundColor: 'modalForeground', }, }; const BottomSheet: React.AbstractComponent< Props, React.ElementRef, > = React.forwardRef>( ForwardedBottomSheet, ); BottomSheet.displayName = 'BottomSheet'; const MemoizedBottomSheet: typeof BottomSheet = React.memo< Props, React.ElementRef, >(BottomSheet); export default MemoizedBottomSheet;