時刻が表示できないバグを修正
This commit is contained in:
@@ -8,7 +8,7 @@ type seTypes = "発編" | "着編" | "通編" | "頃編" | "発" | "着" | strin
|
|||||||
type currentTrainDataType = {
|
type currentTrainDataType = {
|
||||||
Index: number;
|
Index: number;
|
||||||
num: string;
|
num: string;
|
||||||
delay: "入線" | number;
|
delay: "入線" | number | undefined;
|
||||||
Pos: string;
|
Pos: string;
|
||||||
PosNum: number;
|
PosNum: number;
|
||||||
Direction: number;
|
Direction: number;
|
||||||
@@ -128,22 +128,24 @@ export const EachStopList: FC<props> = ({
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{currentTrainData.delay != "入線" && currentTrainData?.delay != 0 && (
|
{currentTrainData?.delay &&
|
||||||
<Text
|
currentTrainData?.delay != "入線" &&
|
||||||
style={{
|
currentTrainData?.delay != 0 && (
|
||||||
fontSize: 15,
|
<Text
|
||||||
color: textColor,
|
style={{
|
||||||
width: 60,
|
fontSize: 15,
|
||||||
position: "absolute",
|
color: textColor,
|
||||||
right: 120,
|
width: 60,
|
||||||
textAlign: "right",
|
position: "absolute",
|
||||||
textDecorationLine: "line-through",
|
right: 120,
|
||||||
fontStyle: seType == "community" ? "italic" : "normal",
|
textAlign: "right",
|
||||||
}}
|
textDecorationLine: "line-through",
|
||||||
>
|
fontStyle: seType == "community" ? "italic" : "normal",
|
||||||
{time}
|
}}
|
||||||
</Text>
|
>
|
||||||
)}
|
{time}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
<StationTimeBox
|
<StationTimeBox
|
||||||
delay={currentTrainData?.delay}
|
delay={currentTrainData?.delay}
|
||||||
textColor={textColor}
|
textColor={textColor}
|
||||||
@@ -186,7 +188,7 @@ const StationNumbersBox: FC<{ stn: string; se: seTypes }> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type StationTimeBoxType = {
|
type StationTimeBoxType = {
|
||||||
delay: "入線" | number;
|
delay: "入線" | number | undefined;
|
||||||
textColor: string;
|
textColor: string;
|
||||||
seType: seTypes;
|
seType: seTypes;
|
||||||
se: string;
|
se: string;
|
||||||
@@ -198,13 +200,16 @@ const StationTimeBox: FC<StationTimeBoxType> = (props) => {
|
|||||||
const dates = dayjs()
|
const dates = dayjs()
|
||||||
.set("hour", parseInt(time.split(":")[0]))
|
.set("hour", parseInt(time.split(":")[0]))
|
||||||
.set("minute", parseInt(time.split(":")[1]))
|
.set("minute", parseInt(time.split(":")[1]))
|
||||||
.add(delay == "入線" ? 0 : delay, "minute");
|
.add(delay == "入線" || delay == undefined ? 0 : delay, "minute");
|
||||||
const timeString = se == "通過" ? "" : dates.format("HH:mm");
|
const timeString = se == "通過" ? "" : dates.format("HH:mm");
|
||||||
return (
|
return (
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: delay != "入線" ? delay != 0 && "red" : textColor,
|
color:
|
||||||
|
delay != "入線" && delay != undefined
|
||||||
|
? delay != 0 && "red"
|
||||||
|
: textColor,
|
||||||
width: 60,
|
width: 60,
|
||||||
fontStyle: seType == "community" ? "italic" : "normal",
|
fontStyle: seType == "community" ? "italic" : "normal",
|
||||||
}}
|
}}
|
||||||
|
@@ -471,10 +471,10 @@ export const EachTrainInfoCore = ({
|
|||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
margin: 10,
|
margin: 10,
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
alignItems: "center",
|
alignItems: "center", backgroundColor:"#ffffffc2"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={{ fontSize: 18, fontWeight: "bold", color: "black" }}>
|
<Text style={{ fontSize: 18, fontWeight: "bold", color: "black",}}>
|
||||||
Twitterで検索
|
Twitterで検索
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
Reference in New Issue
Block a user