From 3531a128ab2a99ffd84dedb8aee6e906032696d6 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Sun, 14 Sep 2025 10:02:06 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=82=BA=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.tsx | 7 +++- .../Apps/FixedPositionBox/FixedStationBox.tsx | 38 ++++++++++++------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/App.tsx b/App.tsx index 2493539..5690aac 100644 --- a/App.tsx +++ b/App.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { Platform, UIManager } from "react-native"; +import { Platform, UIManager, Text } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import { AppContainer } from "./Apps"; import { UpdateAsync } from "./UpdateAsync"; @@ -35,7 +35,10 @@ export default function App() { useEffect(() => { UpdateAsync(); }, []); - + if (Text.defaultProps == null) { + Text.defaultProps = {}; + Text.defaultProps.allowFontScaling = false; + } const ProviderTree = buildProvidersTree([ AllTrainDiagramProvider, NotificationProvider, diff --git a/components/Apps/FixedPositionBox/FixedStationBox.tsx b/components/Apps/FixedPositionBox/FixedStationBox.tsx index 54683a5..9f6ab45 100644 --- a/components/Apps/FixedPositionBox/FixedStationBox.tsx +++ b/components/Apps/FixedPositionBox/FixedStationBox.tsx @@ -16,11 +16,14 @@ import { useAreaInfo } from "@/stateBox/useAreaInfo"; import { useCurrentTrain } from "@/stateBox/useCurrentTrain"; import { useStationList } from "@/stateBox/useStationList"; -import dayjs from "dayjs"; -import { useEffect, useState } from "react"; +import { FC, useEffect, useState } from "react"; import { Text, TouchableOpacity, View } from "react-native"; -export const FixedStation = ({ stationID }) => { +type props = { + stationID: string; +}; + +export const FixedStation: FC = ({ stationID }) => { const { currentTrain, setFixedPosition } = useCurrentTrain(); const { getStationDataFromId } = useStationList(); const [station, setStation] = useState([]); @@ -108,6 +111,9 @@ export const FixedStation = ({ stationID }) => { width: "100%", alignContent: "center", alignItems: "center", + height: 22, + overflow: "hidden", + paddingLeft: 5, }} > { /> { @@ -173,7 +181,7 @@ export const FixedStation = ({ stationID }) => { )) ) : ( - + 当駅を発着する走行中の列車はありません。 @@ -212,10 +220,14 @@ const FixedStationBoxEachTrain = ({ d, station }) => { overflow: "visible", }} > - {d.time} - {name} - {d.lastStation}行 - {trainDelayStatus} + {d.time} + {name} + + {d.lastStation}行 + + + {trainDelayStatus} + ); };