列車アイコンを押したらアンパンマン列車運行情報ページが開くように変更
This commit is contained in:
parent
820623f2ce
commit
9465fd62cf
@ -4,7 +4,6 @@ import ActionSheet from "react-native-actions-sheet";
|
||||
import { EachTrainInfoCore } from "./EachTrainInfoCore";
|
||||
export const EachTrainInfo = ({ payload }) => {
|
||||
if (!payload) return <></>;
|
||||
|
||||
const actionSheetRef = useRef(null);
|
||||
return (
|
||||
<ActionSheet
|
||||
|
@ -4,6 +4,7 @@ import { Ionicons } from "@expo/vector-icons";
|
||||
import dayjs from "dayjs";
|
||||
import { useInterval } from "../../../lib/useInterval";
|
||||
import { Icon } from "@expo/vector-icons/build/createIconSet";
|
||||
import { SheetManager } from "react-native-actions-sheet";
|
||||
|
||||
type GlyphNames = ComponentProps<typeof Ionicons>["name"];
|
||||
|
||||
@ -66,7 +67,15 @@ export const TrainIconStatus: FC<Props> = ({ data,navigate,from }) => {
|
||||
return (
|
||||
<>
|
||||
{trainIcon && (
|
||||
<View style={{}} >
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
navigate("howto", {
|
||||
info: "https://www.jr-eki.com/aptrain/index.html",
|
||||
goTo: from,
|
||||
});
|
||||
SheetManager.hide("EachTrainInfo");
|
||||
}}
|
||||
>
|
||||
{move ? (
|
||||
<Image
|
||||
source={{ uri: trainIcon }}
|
||||
@ -76,7 +85,7 @@ export const TrainIconStatus: FC<Props> = ({ data,navigate,from }) => {
|
||||
) : (
|
||||
<Ionicons {...anpanmanStatus} size={30} style={{ margin: 5 }} />
|
||||
)}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
@ -60,7 +60,7 @@ export default function AllTrainDiagramView() {
|
||||
},
|
||||
navigate,
|
||||
originalStationList,
|
||||
from: "AllTrainDiagramView",
|
||||
from: "AllTrainIDList",
|
||||
};
|
||||
SheetManager.show("EachTrainInfo", {
|
||||
payload,
|
||||
|
@ -40,7 +40,7 @@ export const DynamicHeaderScrollView = (props) => {
|
||||
}, [headerSize]);
|
||||
const viewHeader = useMemo(() => {
|
||||
switch (from) {
|
||||
case "AllTrainDiagramView":
|
||||
case "AllTrainIDList":
|
||||
case "NearTrainDiagramView":
|
||||
case "LED2":
|
||||
return true;
|
||||
|
@ -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") && (
|
||||
<TouchableOpacity
|
||||
style={{
|
||||
padding: 10,
|
||||
@ -49,7 +49,7 @@ export default function TrainBase({ route }) {
|
||||
alignItems: "center",
|
||||
}}
|
||||
onPress={() =>
|
||||
navigate(from == "AllTrainDiagramView" ? "AllTrainIDList" : "menu")
|
||||
navigate(from == "AllTrainIDList" ? "AllTrainIDList" : "menu")
|
||||
}
|
||||
>
|
||||
<View style={{ flex: 1 }} />
|
||||
|
Loading…
Reference in New Issue
Block a user