From 6d51db98fa39ae8ca178992f179d0bcadd850dc4 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Sun, 13 Apr 2025 15:48:25 +0000 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/StationNumberMaker.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/駅名表/StationNumberMaker.tsx b/components/駅名表/StationNumberMaker.tsx index dbeef0e..bd38e40 100644 --- a/components/駅名表/StationNumberMaker.tsx +++ b/components/駅名表/StationNumberMaker.tsx @@ -1,10 +1,11 @@ import React from "react"; import { Text, View } from "react-native"; -import { widthPercentageToDP as wp } from "react-native-responsive-screen"; +import { useWindowDimensions } from "react-native"; import lineColorList from "../../assets/originData/lineColorList"; export const StationNumberMaker = (props) => { const { currentStation, isMatsuyama } = props; + const { width } = useWindowDimensions(); const getTop = (array: number[], index: number) => { if (array.length == 1) return 20; else if (index == 0) return 5; @@ -24,8 +25,8 @@ export const StationNumberMaker = (props) => { alignItems: "center", top: `${getTop(array, index)}%`, right: "10%", - width: wp("10%"), - height: wp("10%"), + width: (width / 100 * 10), + height: (width / 100 * 10), borderColor: lineColorList[lineID], backgroundColor: "white", borderWidth: parseInt("3%"),