getTrainTypeの仕様変更に追従
This commit is contained in:
@@ -260,7 +260,10 @@ export const EachTrainInfoCore = ({
|
||||
})
|
||||
.catch(() => AS.setItem("trainPositionSwitch", "true"));
|
||||
}, []);
|
||||
|
||||
const customTrainType = getTrainType({
|
||||
type: customTrainDataDetector(data.trainNum, allCustomTrainData).type,
|
||||
});
|
||||
|
||||
const openTrainInfo = (d) => {
|
||||
const train = customTrainDataDetector(d, allCustomTrainData);
|
||||
let TrainNumber = "";
|
||||
@@ -269,12 +272,11 @@ export const EachTrainInfoCore = ({
|
||||
parseInt(d.replace("M", "").replace("D", "")) - train.trainNumDistance;
|
||||
TrainNumber = timeInfo + "号";
|
||||
}
|
||||
const limitedData = getTrainType({ type: train.type });
|
||||
const payload = {
|
||||
data: {
|
||||
trainNum: d,
|
||||
limited: `${getTrainType(train.type).data}:${
|
||||
train.trainName
|
||||
}${TrainNumber}`,
|
||||
limited: `${limitedData.data}:${train.trainName}${TrainNumber}`,
|
||||
},
|
||||
navigate,
|
||||
from: from == "LED" ? "LED2" : "NearTrainDiagramView",
|
||||
@@ -332,9 +334,7 @@ export const EachTrainInfoCore = ({
|
||||
style: {
|
||||
maxHeight: isLandscape ? height - 94 : (height / 100) * 70,
|
||||
backgroundColor:
|
||||
getTrainType(
|
||||
customTrainDataDetector(data.trainNum, allCustomTrainData).type
|
||||
).data === "notService"
|
||||
customTrainType.data === "notService"
|
||||
? "#777777ff"
|
||||
: "white",
|
||||
},
|
||||
@@ -367,9 +367,7 @@ export const EachTrainInfoCore = ({
|
||||
/>
|
||||
}
|
||||
>
|
||||
{getTrainType(
|
||||
customTrainDataDetector(data.trainNum, allCustomTrainData).type
|
||||
).data === "notService" && (
|
||||
{customTrainType.data === "notService" && (
|
||||
<Text style={{ backgroundColor: "#ffffffc2", fontWeight: "bold" }}>
|
||||
この列車には乗車できません。
|
||||
</Text>
|
||||
|
Reference in New Issue
Block a user