From 60d8caaefaf3739e5d2e1235910dbfc01e6d5fbc Mon Sep 17 00:00:00 2001 From: harukin-OneMix4 Date: Wed, 3 Jan 2024 00:01:20 +0900 Subject: [PATCH] =?UTF-8?q?=E9=A7=85=E5=90=8D=E6=A8=99=E3=81=AE=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/Sign.js | 59 ++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 7f07697..e5ec5cf 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -6,6 +6,8 @@ import { useInterval } from "../../lib/useInterval"; import { AS } from "../../storageControl"; import { useFavoriteStation } from "../../stateBox/useFavoriteStation"; +import lineColorList from "../../assets/originData/lineColorList"; + export default function Sign(props) { const { currentStation, originalStationList, oP, oLP } = props; const { favoriteStation, setFavoriteStation } = useFavoriteStation(); @@ -24,7 +26,7 @@ export default function Sign(props) { return false; } }); - setTestButtonStatus(isFavorite.length != 0); + setTestButtonStatus(isFavorite.length == 0 ? false : true); }, [favoriteStation, currentStation]); useInterval(() => { @@ -220,27 +222,40 @@ const StationNumberMaker = (props) => { }; return props.currentStation .filter((d) => (d.StationNumber ? true : false)) - .map((d, index, array) => ( - - - {d.StationNumber} - - - )); + .map((d, index, array) => { + const lineID = d.StationNumber.slice(0, 1); + const lineName = d.StationNumber.slice(1); + return ( + + + + {lineID + "\n" + lineName} + + + + ); + }); }; const StationNameArea = (props) => {