diff --git a/components/ActionSheetComponents/JRSTraInfo.js b/components/ActionSheetComponents/JRSTraInfo.js
index 0acbd6d..cc073c7 100644
--- a/components/ActionSheetComponents/JRSTraInfo.js
+++ b/components/ActionSheetComponents/JRSTraInfo.js
@@ -10,6 +10,7 @@ import {
BackHandler,
} from "react-native";
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
+import dayjs from "dayjs";
import ActionSheet, {
SheetManager,
useScrollHandlers,
@@ -19,9 +20,11 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
import ViewShot from "react-native-view-shot";
import * as Sharing from "expo-sharing";
import { useTrainDelayData } from "../../stateBox/useTrainDelayData";
+import { BottomButtons } from "./JRSTraInfo/BottomButtons";
export const JRSTraInfo = () => {
const { getTime, delayData, loadingDelayData, setLoadingDelayData } =
useTrainDelayData();
+ const timeData = dayjs(getTime).format("HH:mm");
const actionSheetRef = useRef(null);
const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef);
const insets = useSafeAreaInsets();
@@ -46,11 +49,7 @@ export const JRSTraInfo = () => {
ref={actionSheetRef}
isModal={Platform.OS == "ios"}
containerStyle={
- Platform.OS == "android"
- ? {
- paddingBottom: insets.bottom,
- }
- : {}
+ Platform.OS == "android" ? { paddingBottom: insets.bottom } : {}
}
useBottomSafeAreaPadding={Platform.OS == "android"}
>
@@ -90,15 +89,8 @@ export const JRSTraInfo = () => {
列車遅延速報EX
- {/* {doFetch()}}>
- 最新の情報へ更新
- */}
- {getTime
- ? getTime.toLocaleTimeString("ja-JP").split(":")[0] +
- ":" +
- getTime.toLocaleTimeString("ja-JP").split(":")[1]
- : NaN}{" "}
+ {timeData}
{
-
-
- Linking.openURL("https://mstdn.y-zu.org/@JRSTraInfoEX")
- }
- >
-
-
-
- MastodonBOT
-
-
-
-
-
-
-
+
);
diff --git a/components/ActionSheetComponents/JRSTraInfo/BottomButtons.tsx b/components/ActionSheetComponents/JRSTraInfo/BottomButtons.tsx
new file mode 100644
index 0000000..5be71f4
--- /dev/null
+++ b/components/ActionSheetComponents/JRSTraInfo/BottomButtons.tsx
@@ -0,0 +1,49 @@
+import React, { CSSProperties, FC } from "react";
+import {
+ View,
+ Text,
+ TouchableOpacity,
+ Linking,
+ StyleProp,
+ ViewStyle,
+} from "react-native";
+import { MaterialCommunityIcons } from "@expo/vector-icons";
+
+const styles: StyleProp = {
+ padding: 10,
+ flexDirection: "row",
+ borderColor: "white",
+ borderWidth: 1,
+ margin: 10,
+ borderRadius: 5,
+ alignItems: "center",
+ backgroundColor: "#0099CC",
+};
+export const BottomButtons: FC<{ onCapture: () => void }> = ({ onCapture }) => {
+ return (
+
+ Linking.openURL("https://mstdn.y-zu.org/@JRSTraInfoEX")}
+ >
+
+
+
+ MastodonBOT
+
+
+
+
+
+
+
+
+ );
+};