import { View, Text } from "react-native"; import { useCurrentTrain } from "../../../stateBox/useCurrentTrain"; import LottieView from "lottie-react-native"; import { Ionicons, AntDesign } from "@expo/vector-icons"; import { useStationList } from "@/stateBox/useStationList"; import { useNavigation } from "@react-navigation/native"; export const Header = ({ station }) => { const { currentTrainLoading, setCurrentTrainLoading, getCurrentTrain, inject, } = useCurrentTrain(); const { getInjectJavascriptAddress } = useStationList(); const { navigate } = useNavigation(); return ( 次の列車 Next Train {currentTrainLoading == "loading" ? ( ) : currentTrainLoading == "error" ? ( { setCurrentTrainLoading("loading"); getCurrentTrain(); }} /> ) : null} ); };