Merge commit '0fdcee6f1729c2e1a8c934c1e6f17395c462cf8d' into develop

This commit is contained in:
harukin-expo-dev-env 2024-08-22 09:23:25 +00:00
commit 7d7fab7bf3
18 changed files with 27 additions and 21 deletions

View File

@ -1,8 +1,8 @@
import React from "react";
import React, { FC } from "react";
import { View, Text, TouchableWithoutFeedback } from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import { Linking } from "react-native";
export const DataFromButton = ({ i }) => {
export const DataFromButton: FC<{ i: string }> = ({ i }) => {
const [station, se, time] = i.split(",");
return (
<TouchableWithoutFeedback

View File

@ -1,17 +1,17 @@
import React from "react";
import { View, Text } from "react-native";
import React, { CSSProperties, FC } from "react";
import { View, Text, StyleProp, TextStyle, ViewStyle } from "react-native";
export const StateBox = ({ text, title, style, mode }) => (
type stateBox = {
text: string;
title: string;
style?: ViewStyle;
mode?: number;
};
export const StateBox: FC<stateBox> = ({ text, title, style, mode }) => (
<View style={{ ...(mode == 2 ? boxStyle2 : boxStyle), ...style }}>
<Text style={{ fontSize: 12, color: "#0099CC" }}>{title}</Text>
<View style={{ flex: 1 }} />
<View
style={{
color: "#0099CC",
textAlign: "right",
flexDirection: mode == 2 ? "row" : "column",
}}
>
<View style={{ flexDirection: mode == 2 ? "row" : "column" }}>
{text?.match("") ? (
<>
<Text style={mode == 2 ? boxTextStyle2 : boxTextStyle}>
@ -30,27 +30,27 @@ export const StateBox = ({ text, title, style, mode }) => (
</View>
</View>
);
const boxStyle = {
const boxStyle: ViewStyle = {
flex: 1,
backgroundColor: "white",
borderRadius: 10,
padding: 10,
margin: 10,
};
const boxStyle2 = {
const boxStyle2: ViewStyle = {
flex: 1,
backgroundColor: "white",
borderRadius: 10,
padding: 5,
margin: 5,
};
const boxTextStyle2 = {
const boxTextStyle2: TextStyle = {
fontSize: 18,
color: "#0099CC",
textAlign: "right",
};
const boxTextStyle = {
const boxTextStyle: TextStyle = {
fontSize: 25,
color: "#0099CC",
textAlign: "right",

View File

@ -7,7 +7,7 @@ import koutoku from "../assets/originData/koutoku";
import tokushima from "../assets/originData/tokushima";
import naruto from "../assets/originData/naruto";
import seto from "../assets/originData/seto";
export const getStationList2 = async (props) => {
export const getStationList2 = async () => {
return {
yosan,
uwajima,

View File

@ -1,7 +1,7 @@
type getTrainDelayStatus = (
current: { delay: string; Pos: string },
current: { delay: number | "入線" | string; Pos: string },
Station_JP: string
) => string;
) => string | number;
export const getTrainDelayStatus: getTrainDelayStatus = (
current,
Station_JP
@ -17,7 +17,7 @@ export const getTrainDelayStatus: getTrainDelayStatus = (
}
case Number.isNaN(delay):
return delay;
case delay === "0":
case delay === 0:
return "定刻通り";
default:
return delay + "分遅れ";

View File

@ -1,6 +1,12 @@
import { getJRF } from "../components/custom-train-data";
export const injectJavascriptData = (
type InjectJavascriptData = (
a: string,
b: string,
c: string,
d: string
) => string;
export const injectJavascriptData: InjectJavascriptData = (
mapSwitch,
iconSetting,
stationMenu,