From a8f90dcd63848f43a62ee33e67cd74d6dac097e3 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Mon, 14 Oct 2024 06:39:11 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AF=E3=83=A9=E3=83=83=E3=82=B7=E3=83=A5?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TrainTypeInfoModal.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/TrainTypeInfoModal.tsx b/src/components/TrainTypeInfoModal.tsx index 3741c1f7a..0d5529326 100644 --- a/src/components/TrainTypeInfoModal.tsx +++ b/src/components/TrainTypeInfoModal.tsx @@ -4,7 +4,7 @@ import { Modal, ScrollView, StyleSheet, View } from 'react-native' import { RFValue } from 'react-native-responsive-fontsize' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { useRecoilValue } from 'recoil' -import { Line, Station, TrainType } from '../../gen/proto/stationapi_pb' +import { Station, TrainType } from '../../gen/proto/stationapi_pb' import { LED_THEME_BG_COLOR } from '../constants' import { useThemeStore } from '../hooks/useThemeStore' import { APP_THEME } from '../models/Theme' @@ -78,7 +78,7 @@ export const TrainTypeInfoModal: React.FC = ({ ? 0 : a.trainType?.id - b.trainType?.id ) - : ([selectedLine] as Line[]), + : [selectedLine], [selectedLine, trainType?.lines] ) @@ -186,11 +186,11 @@ export const TrainTypeInfoModal: React.FC = ({ flexDirection: 'row', alignItems: 'center', }} - key={l.id} + key={l?.id} > = ({ flex: 1, }} > - {isJapanese ? l.nameShort : l.nameRoman}:{' '} + {(isJapanese ? l?.nameShort : l?.nameRoman) ?? ''}:{' '} = ({ }} > {isJapanese - ? l.trainType?.name ?? '普通/各駅停車' - : l.trainType?.nameRoman ?? 'Local'} + ? l?.trainType?.name ?? '普通/各駅停車' + : l?.trainType?.nameRoman ?? 'Local'} ))}