import React, { FC, useRef } from "react"; import { View, Platform } from "react-native"; import ActionSheet from "react-native-actions-sheet"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { SpecialTrainInfoBox } from "../Menu/SpecialTrainInfoBox"; type props = { payload: { navigate: (screen: string, params?: object) => void }; }; export const SpecialTrainInfo: FC = ({ payload }) => { const { navigate } = payload; const actionSheetRef = useRef(null); const insets = useSafeAreaInsets(); return ( } ref={actionSheetRef} isModal={Platform.OS == "ios"} containerStyle={ Platform.OS == "android" ? { paddingBottom: insets.bottom, } : {} } useBottomSafeAreaPadding={Platform.OS == "android"} > ); };