41 lines
1014 B
TypeScript
41 lines
1014 B
TypeScript
import React, { FC } from "react";
|
|
import { Linking } from "react-native";
|
|
import { FontAwesome } from "@expo/vector-icons";
|
|
import { TicketBox } from "@/components/atom/TicketBox";
|
|
type Props = {
|
|
navigate: (screen: string, params?: object) => void;
|
|
onExit: () => void;
|
|
currentStation: {
|
|
Station_JP: string;
|
|
Station_EN: string;
|
|
StationName?: string;
|
|
MyStation?: string;
|
|
StationNumber: string;
|
|
DispNum?: string;
|
|
StationTimeTable: string;
|
|
StationMap?: string;
|
|
JrHpUrl?: string;
|
|
lat: number;
|
|
lng: number;
|
|
jslodApi: string;
|
|
}[];
|
|
};
|
|
export const StationDiagramButton: FC<Props> = (props) => {
|
|
const { navigate, onExit, currentStation } = props;
|
|
return (
|
|
<TicketBox
|
|
backgroundColor={"#8F5902"}
|
|
icon={<FontAwesome name="table" color="white" size={50} />}
|
|
flex={1}
|
|
onPressButton={() => {
|
|
navigate("stDiagram", {
|
|
currentStation,
|
|
});
|
|
onExit();
|
|
}}
|
|
>
|
|
時刻表v2
|
|
</TicketBox>
|
|
);
|
|
};
|