stationListの汎用化
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
import { SheetManager } from "react-native-actions-sheet";
|
||||
import { AS } from "../../storageControl";
|
||||
import trainList from "../../assets/originData/trainList";
|
||||
import { lineList, lineListPair } from "../../lib/getStationList";
|
||||
import { lineListPair } from "../../lib/getStationList";
|
||||
import { useCurrentTrain } from "../../stateBox/useCurrentTrain";
|
||||
import { checkDuplicateTrainData } from "../../lib/checkDuplicateTrainData";
|
||||
import { getTrainType } from "../../lib/getTrainType";
|
||||
@@ -46,7 +46,7 @@ export const EachTrainInfoCore = ({
|
||||
}) => {
|
||||
// const [actionSheetHorizonalScroll, setActionSheetHorizonalScroll] = useState(false);
|
||||
const { currentTrain } = useCurrentTrain();
|
||||
const { originalStationList } = useStationList();
|
||||
const { originalStationList,stationList } = useStationList();
|
||||
const { setTrainInfo } = useTrainMenu();
|
||||
const [currentTrainData, setCurrentTrainData] = useState();
|
||||
|
||||
@@ -86,15 +86,6 @@ export const EachTrainInfoCore = ({
|
||||
const [showThrew, setShowThrew] = useState(false);
|
||||
const [haveThrough, setHaveThrough] = useState(false);
|
||||
|
||||
const stationList =
|
||||
originalStationList &&
|
||||
lineList.map((d) =>
|
||||
originalStationList[d].map((a) => ({
|
||||
StationNumber: a.StationNumber,
|
||||
StationName: a.Station_JP,
|
||||
}))
|
||||
);
|
||||
|
||||
// 使用例
|
||||
const stopStationIDList = trainDataWidhThrough.map((i) => {
|
||||
const [station, se, time] = i.split(",");
|
||||
|
Reference in New Issue
Block a user