import React, { FC } from "react"; import { Text, View } from "react-native"; import { useWindowDimensions } from "react-native"; import lineColorList from "@/assets/originData/lineColorList"; import { StationProps } from "@/lib/CommonTypes"; type props = { currentStation: StationProps[]; useEach?: boolean; singleSize?: number; }; export const StationNumberMaker: FC = (props) => { const { currentStation, useEach = false, singleSize } = props; const { width } = useWindowDimensions(); 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} ); })} };