diff --git a/components/ActionSheetComponents/EachTrainInfo.js b/components/ActionSheetComponents/EachTrainInfo.js index 71599d4..ecaa412 100644 --- a/components/ActionSheetComponents/EachTrainInfo.js +++ b/components/ActionSheetComponents/EachTrainInfo.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, useRef } from "react"; import { View, LayoutAnimation, @@ -11,7 +11,10 @@ import { Platform, } from "react-native"; import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons"; -import ActionSheet, { SheetManager } from "react-native-actions-sheet"; +import ActionSheet, { + SheetManager, + useScrollHandlers, +} from "react-native-actions-sheet"; import { AS } from "../../storageControl"; import LottieView from "lottie-react-native"; import trainList from "../../assets/originData/trainList"; @@ -239,13 +242,18 @@ export const EachTrainInfo = (props) => { .replace("マリン", "マリンライナー") .replace("ライナーライナー", "ライナー"); }; - + const actionSheetRef = useRef(null); + const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef); return ( - }> + } + ref={actionSheetRef} + > { )} { if (!Platform.OS !== "android") return; setIsTop(e.nativeEvent.contentOffset.y < 0); }} > - + {/* { const { getTime, delayData, loadingDelayData, setLoadingDelayData } = useTrainDelayData(); + const actionSheetRef = useRef(null); + const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef); return ( - }> + } + ref={actionSheetRef} + > { }} /> - + {loadingDelayData ? ( diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index 9d33582..5d45976 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -50,7 +50,7 @@ export const StationDeteilView = (props) => { key={currentStation} style={{ backgroundColor: "white", - borderRadius: 5, + borderTopRadius: 5, borderColor: "dark", borderWidth: 1, }}