宇多津の方向問題を修正
This commit is contained in:
parent
25c0d7ae00
commit
fb3488f1bb
@ -130,7 +130,6 @@ export const StationDeteilView = (props) => {
|
|||||||
info:
|
info:
|
||||||
currentStation[0].JrHpUrl.replace("/index.html", "/") +
|
currentStation[0].JrHpUrl.replace("/index.html", "/") +
|
||||||
"/kounai_map.html",
|
"/kounai_map.html",
|
||||||
|
|
||||||
goTo,
|
goTo,
|
||||||
useShow,
|
useShow,
|
||||||
});
|
});
|
||||||
|
@ -64,7 +64,7 @@ export default function Sign(props) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setNexPrePosition(0);
|
setNexPrePosition(0);
|
||||||
getPreNextStation(currentStation[0]);
|
getPreNextStation(currentStation[0]);
|
||||||
if(currentStation.length == 1)return ()=>{};
|
if (currentStation.length == 1) return () => {};
|
||||||
getPreNextStation(currentStation[1]);
|
getPreNextStation(currentStation[1]);
|
||||||
}, [currentStation]);
|
}, [currentStation]);
|
||||||
|
|
||||||
@ -96,8 +96,13 @@ export default function Sign(props) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(returnData[0])setPreStation(returnData[0]);
|
if (now.Station_JP == "宇多津" && now.StationNumber == null) {
|
||||||
if(returnData[1])setNexStation(returnData[1]);
|
if (returnData[1]) setPreStation(returnData[1]);
|
||||||
|
if (returnData[0]) setNexStation(returnData[0]);
|
||||||
|
} else {
|
||||||
|
if (returnData[0]) setPreStation(returnData[0]);
|
||||||
|
if (returnData[1]) setNexStation(returnData[1]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const isMatsuyama = currentStation[0].StationNumber == "Y55";
|
const isMatsuyama = currentStation[0].StationNumber == "Y55";
|
||||||
//const isMatsuyama = true;
|
//const isMatsuyama = true;
|
||||||
@ -106,11 +111,7 @@ export default function Sign(props) {
|
|||||||
const otherData = favoriteStation.filter((d) => {
|
const otherData = favoriteStation.filter((d) => {
|
||||||
const compare = JSON.stringify(d);
|
const compare = JSON.stringify(d);
|
||||||
const current = JSON.stringify(currentStation);
|
const current = JSON.stringify(currentStation);
|
||||||
if (compare !== current) {
|
return compare !== current;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
AS.setItem("favoriteStation", JSON.stringify(otherData));
|
AS.setItem("favoriteStation", JSON.stringify(otherData));
|
||||||
setFavoriteStation(otherData);
|
setFavoriteStation(otherData);
|
||||||
|
Loading…
Reference in New Issue
Block a user