diff --git a/components/ActionSheetComponents/EachTrainInfo.js b/components/ActionSheetComponents/EachTrainInfo.js index d2830ac..450dff4 100644 --- a/components/ActionSheetComponents/EachTrainInfo.js +++ b/components/ActionSheetComponents/EachTrainInfo.js @@ -2,9 +2,8 @@ import React, { useRef } from "react"; import { Platform } from "react-native"; import ActionSheet from "react-native-actions-sheet"; import { EachTrainInfoCore } from "./EachTrainInfoCore"; -export const EachTrainInfo = ({payload}) => { +export const EachTrainInfo = ({ payload }) => { if (!payload) return <>; - const actionSheetRef = useRef(null); return ( ["name"]; @@ -16,7 +17,7 @@ type apt = { name: GlyphNames; color: string; }; -export const TrainIconStatus: FC = ({ data,navigate,from }) => { +export const TrainIconStatus: FC = ({ data, navigate, from }) => { const [trainIcon, setTrainIcon] = useState(null); const [anpanmanStatus, setAnpanmanStatus] = useState(); useEffect(() => { @@ -34,7 +35,7 @@ export const TrainIconStatus: FC = ({ data,navigate,from }) => { case "57D": setTrainIcon( "https://n8n.haruk.in/webhook/dosan-anpanman-pictures.png?trainNum=" + - data.trainNum + data.trainNum ); fetch( `https://n8n.haruk.in/webhook/dosan-anpanman?month=${dayjs().format( @@ -66,7 +67,15 @@ export const TrainIconStatus: FC = ({ data,navigate,from }) => { return ( <> {trainIcon && ( - + { + navigate("howto", { + info: "https://www.jr-eki.com/aptrain/index.html", + goTo: from, + }); + SheetManager.hide("EachTrainInfo"); + }} + > {move ? ( = ({ data,navigate,from }) => { ) : ( )} - + )} ); diff --git a/components/AllTrainDiagramView.js b/components/AllTrainDiagramView.js index 8c2583d..26856cd 100644 --- a/components/AllTrainDiagramView.js +++ b/components/AllTrainDiagramView.js @@ -60,7 +60,7 @@ export default function AllTrainDiagramView() { }, navigate, originalStationList, - from: "AllTrainDiagramView", + from: "AllTrainIDList", }; SheetManager.show("EachTrainInfo", { payload, diff --git a/components/DynamicHeaderScrollView.js b/components/DynamicHeaderScrollView.js index 9fc6bd1..5602473 100644 --- a/components/DynamicHeaderScrollView.js +++ b/components/DynamicHeaderScrollView.js @@ -40,7 +40,7 @@ export const DynamicHeaderScrollView = (props) => { }, [headerSize]); const viewHeader = useMemo(() => { switch (from) { - case "AllTrainDiagramView": + case "AllTrainIDList": case "NearTrainDiagramView": case "LED2": return true; diff --git a/components/trainbaseview.js b/components/trainbaseview.js index 8b85031..dd68263 100644 --- a/components/trainbaseview.js +++ b/components/trainbaseview.js @@ -37,7 +37,7 @@ export default function TrainBase({ route }) { setSupportMultipleWindows={false} onMessage={(event) => {}} /> - {(from == "LED" || from == "LED2" || from == "AllTrainDiagramView") && ( + {(from == "LED" || from == "LED2" || from == "AllTrainIDList") && ( - navigate(from == "AllTrainDiagramView" ? "AllTrainIDList" : "menu") + navigate(from == "AllTrainIDList" ? "AllTrainIDList" : "menu") } >