しおかぜが表示されないバグの修正、スマート駅ちゃんの実装

This commit is contained in:
harukin-OneMix4
2022-11-29 16:42:00 +09:00
parent 80d0ce21a9
commit 93f9f48ecb
3 changed files with 18 additions and 8 deletions

22
menu.js
View File

@@ -78,11 +78,7 @@ export default function Menu(props) {
}, []);
const [originalStationList, setOriginalStationList] = useState();
useEffect(() => {
getStationList().then((stationList) => {
setOriginalStationList(stationList);
});
}, []);
useEffect(() => getStationList().then(setOriginalStationList), []);
const [stationName, setStationName] = useState(undefined);
const [currentStation, setCurrentStation] = useState(undefined);
@@ -147,7 +143,7 @@ export default function Menu(props) {
)
.then((response) => response.text())
.then((data) => setDelayData(data !== "" ? data.split("^") : null))
.then(() => LayoutAnimation.easeInEaseOut())
.then(LayoutAnimation.easeInEaseOut)
.then(() => setGetTime(new Date()))
.finally(() => setLoadingDelayData(false));
}, [loadingDelayData]);
@@ -379,6 +375,20 @@ export default function Menu(props) {
旅行ツアー
</TicketBox>
</View>
<TextBox
backgroundColor="#0099CC"
flex={1}
onPressButton={() =>
Linking.openURL("https://www.jr-eki.com/smart-eki/index.html")
}
>
<Text style={{ color: "white", fontWeight: "bold", fontSize: 20 }}>
スマートえきちゃん
</Text>
<Text style={{ color: "white", fontSize: 18 }}>
JR四国のチケットレススマホアプリです
</Text>
</TextBox>
<TextBox
backgroundColor="#0099CC"
flex={1}