import React from "react"; import { Text, View } from "react-native"; import { widthPercentageToDP as wp } from "react-native-responsive-screen"; import lineColorList from "../../assets/originData/lineColorList"; export const StationNumberMaker = (props) => { const { currentStation, isMatsuyama } = props; const getTop = (array: number[], index: number) => { if (array.length == 1) return 20; else if (index == 0) return 5; else if (index == 1) return 35; else return 20; }; return currentStation .filter((d) => (d.StationNumber ? true : false)) .map((d, index, array) => { const lineID = d.StationNumber.slice(0, 1); const lineName = d.StationNumber.slice(1); return ( {lineID + "\n" + lineName} ); }); };