jrshikoku/components/CurrentTrainListView.js
harukin-expo-dev-env 06ba5fe1de LEDの処理大整理
2024-09-09 13:50:20 +00:00

16 lines
610 B
JavaScript

import React from "react";
import { View, Text } from "react-native";
import { useCurrentTrain } from "../stateBox/useCurrentTrain";
import { useNavigation } from "@react-navigation/native";
import { BigButton } from "./atom/BigButton";
export default function CurrentTrainListView() {
const { navigate } = useNavigation();
const { currentTrain } = useCurrentTrain();
return (
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
{currentTrain && currentTrain.map((d) => <Text>{d.num}</Text>)}
<BigButton onPress={() => navigate("menu")} string="閉じる" />
</View>
);
}