From 10b37d61db19fd2b22934be96d82d0c9983dd040 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sat, 8 Oct 2022 18:43:40 +0900 Subject: [PATCH] =?UTF-8?q?=E9=A7=85=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3?= =?UTF-8?q?=E3=83=88=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StationDeteilView.js | 42 +++++ components/atom/TextBox.js | 23 +++ components/atom/TicketBox.js | 24 +++ components/atom/UsefulBox.js | 22 +++ menu.js | 149 ++---------------- 5 files changed, 120 insertions(+), 140 deletions(-) create mode 100644 components/atom/TextBox.js create mode 100644 components/atom/TicketBox.js create mode 100644 components/atom/UsefulBox.js diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index 541e641..408b6d6 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -1,4 +1,46 @@ +import React, { Component, useRef, useState, useEffect } from "react"; +import { + StatusBar, + Platform, + View, + LayoutAnimation, + ScrollView, + Linking, + Text, + TouchableOpacity, +} from "react-native"; +import Image from "react-native-remote-svg"; +import Constants from "expo-constants"; +import { List, ListItem } from "native-base"; +import Icon from "react-native-vector-icons/Entypo"; +import * as Location from "expo-location"; +import StatusbarDetect from "../../StatusbarDetect"; +var Status = StatusbarDetect(); +import { useNavigation } from "@react-navigation/native"; +import AutoHeightImage from "react-native-auto-height-image"; +import { + widthPercentageToDP as wp, + heightPercentageToDP as hp, +} from "react-native-responsive-screen"; +import { + FontAwesome, + Fontisto, + Foundation, + Ionicons, + MaterialCommunityIcons, +} from "@expo/vector-icons"; +import * as WebBrowser from "expo-web-browser"; +import ActionSheet from "react-native-actions-sheet"; +import LottieView from "lottie-react-native"; +import SvgUri from "react-native-svg-uri"; +import Sign from "../../components/駅名表/Sign"; + +import { UsefulBox } from "../atom/UsefulBox"; +import { TicketBox } from "../atom/TicketBox"; +import { TextBox } from "../atom/TextBox"; + export const StationDeteilView = (props) => { + const { StationBoardAcSR, currentStation, originalStationList } = props; return ( { + const { backgroundColor, flex, onPressButton, children } = props; + return ( + + + {children} + + + ); +}; diff --git a/components/atom/TicketBox.js b/components/atom/TicketBox.js new file mode 100644 index 0000000..6d34b95 --- /dev/null +++ b/components/atom/TicketBox.js @@ -0,0 +1,24 @@ +import { TouchableOpacity, Text } from "react-native"; + +export const TicketBox = (props) => { + const { icon, backgroundColor, flex, onPressButton, children } = props; + return ( + + + {children} + + {icon} + + ); +}; diff --git a/components/atom/UsefulBox.js b/components/atom/UsefulBox.js new file mode 100644 index 0000000..afab4cd --- /dev/null +++ b/components/atom/UsefulBox.js @@ -0,0 +1,22 @@ +import { TouchableOpacity, Text } from "react-native"; +import { MaterialCommunityIcons } from "@expo/vector-icons"; +export const UsefulBox = (props) => { + const { icon, backgroundColor, flex, onPressButton, children } = props; + return ( + + + + {children} + + + ); +}; diff --git a/menu.js b/menu.js index b087a52..cbba030 100644 --- a/menu.js +++ b/menu.js @@ -33,6 +33,7 @@ import * as WebBrowser from "expo-web-browser"; import ActionSheet from "react-native-actions-sheet"; import LottieView from "lottie-react-native"; import SvgUri from "react-native-svg-uri"; +import { StationDeteilView } from "./components/ActionSheetComponents/StationDeteilView"; import 予讃線 from "./assets/四国旅客鉄道予讃線.json"; import 土讃線 from "./assets/四国旅客鉄道土讃線.json"; @@ -43,70 +44,9 @@ import 鳴門線 from "./assets/四国旅客鉄道鳴門線.json"; import LED_vision from "./components/発車時刻表/LED_vidion"; import Sign from "./components/駅名表/Sign"; -const UsefulBox = (props) => { - const { icon, backgroundColor, flex, onPressButton, children } = props; - return ( - - - - {children} - - - ); -}; -const TicketBox = (props) => { - const { icon, backgroundColor, flex, onPressButton, children } = props; - return ( - - - {children} - - {icon} - - ); -}; - -const TextBox = (props) => { - const { backgroundColor, flex, onPressButton, children } = props; - return ( - - - {children} - - - ); -}; +import { UsefulBox } from "./components/atom/UsefulBox"; +import { TicketBox } from "./components/atom/TicketBox"; +import { TextBox } from "./components/atom/TextBox"; export default function Menu(props) { const { @@ -850,6 +790,11 @@ export default function Menu(props) { source={require("./assets/トレインビジョン関係/1.svg")} /> */} + - {}} - > - - - - - - {currentStation && ( - Linking.openURL(currentStation[0].StationTimeTable)} - /> - )} - {currentStation && ( - - {!currentStation[0].JrHpUrl || ( - } - flex={1} - onPressButton={() => - Linking.openURL(currentStation[0].JrHpUrl) - } - > - web - - )} - {!currentStation[0].StationTimeTable || ( - } - flex={1} - onPressButton={() => - Linking.openURL(currentStation[0].StationTimeTable) - } - > - 時刻表 - - )} - {!currentStation[0].StationMap || ( - } - flex={1} - onPressButton={() => - Linking.openURL(currentStation[0].StationMap) - } - > - GoogleMap - - )} - - )} - - - ); }