From 367a70170f088056333778f954f2d1cd16843f9c Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Tue, 12 Aug 2025 16:51:42 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../発車時刻表/LED_inside_Component/TrainPosition.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/発車時刻表/LED_inside_Component/TrainPosition.tsx b/components/発車時刻表/LED_inside_Component/TrainPosition.tsx index c6243b4..7e41950 100644 --- a/components/発車時刻表/LED_inside_Component/TrainPosition.tsx +++ b/components/発車時刻表/LED_inside_Component/TrainPosition.tsx @@ -53,10 +53,9 @@ export const TrainPosition: FC = ({ ) .then((res) => res.json()) .then((data: { type: string; platform: number; description: string }) => { - setPlatformNumber(data?.type == "Station" ? data?.platform : undefined); - setPlatformDescription( - data?.type == "Station" ? data?.description : undefined - ); + const { type, platform, description } = data; + setPlatformNumber(type == "Station" ? platform : undefined); + setPlatformDescription(type == "Station" ? description : undefined); }); }, [currentTrainData, currentTrain]);