diff --git a/Apps.js b/Apps.js index fe2ddcf..f06b756 100644 --- a/Apps.js +++ b/Apps.js @@ -311,7 +311,6 @@ export default function Apps({ stationData }) { { return ( ); diff --git a/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js b/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js index 1f68b85..a289e24 100644 --- a/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js +++ b/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js @@ -7,7 +7,6 @@ export const ShortHeader = ({ currentPosition, nearTrainIDList, openTrainInfo, - navigate, }) => { return ( ); diff --git a/components/ActionSheetComponents/EachTrainInfo/TrainDataView.js b/components/ActionSheetComponents/EachTrainInfo/TrainDataView.js index 1f22c43..aba8784 100644 --- a/components/ActionSheetComponents/EachTrainInfo/TrainDataView.js +++ b/components/ActionSheetComponents/EachTrainInfo/TrainDataView.js @@ -5,6 +5,7 @@ import { useDeviceOrientationChange } from "../../../stateBox/useDeviceOrientati import { getStationList2 } from "../../../lib/getStationList2"; import { useCurrentTrain } from "../../../stateBox/useCurrentTrain"; import { SheetManager } from "react-native-actions-sheet"; +import { useNavigation } from "@react-navigation/native"; export const TrainDataView = ({ currentTrainData, @@ -12,8 +13,8 @@ export const TrainDataView = ({ nearTrainIDList, openTrainInfo, mode = 0, - navigate, }) => { + const { navigate } = useNavigation(); const { width, height } = useWindowDimensions(); const { isLandscape } = useDeviceOrientationChange(); const { webview, getCurrentTrain } = useCurrentTrain(); @@ -42,8 +43,11 @@ export const TrainDataView = ({ if (x.StationNumber == currentPosition[0]) test.push({ line: d, station: x }); }); - if(currentPosition[0]== "M12"){ - test.push({ line: "seto", station: {Station_JP: "児島", MyStation: "0"}}); + if (currentPosition[0] == "M12") { + test.push({ + line: "seto", + station: { Station_JP: "児島", MyStation: "0" }, + }); } }); if (!test.length) return; diff --git a/components/ActionSheetComponents/EachTrainInfoCore.js b/components/ActionSheetComponents/EachTrainInfoCore.js index 3c49f66..a35b7dc 100644 --- a/components/ActionSheetComponents/EachTrainInfoCore.js +++ b/components/ActionSheetComponents/EachTrainInfoCore.js @@ -32,18 +32,18 @@ import { getType } from "../../lib/eachTrainInfoCoreLib/getType"; import { searchSpecialTrain } from "../../lib/eachTrainInfoCoreLib/searchSpecialTrain"; import { openBackTrainInfo } from "../../lib/eachTrainInfoCoreLib/openBackTrainInfo"; import { ShowSpecialTrain } from "./EachTrainInfo/ShowSpecialTrain"; +import { useNavigation } from "@react-navigation/native"; export const EachTrainInfoCore = ({ actionSheetRef, data, - navigate, originalStationList, openStationACFromEachTrainInfo, from, setTrainInfo, }) => { // const [actionSheetHorizonalScroll, setActionSheetHorizonalScroll] = useState(false); - + const { navigate } = useNavigation(); const { currentTrain } = useCurrentTrain(); const [currentTrainData, setCurrentTrainData] = useState(); @@ -309,7 +309,6 @@ export const EachTrainInfoCore = ({ currentPosition={currentPosition} nearTrainIDList={nearTrainIDList} openTrainInfo={openTrainInfo} - navigate={navigate} /> } longHeader={ @@ -318,7 +317,6 @@ export const EachTrainInfoCore = ({ currentPosition={currentPosition} nearTrainIDList={nearTrainIDList} openTrainInfo={openTrainInfo} - navigate={navigate} /> } topStickyContent={