From 5d711d37550d288142e3e768a2a0f42a7279d434 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Thu, 18 Apr 2024 03:31:33 +0000 Subject: [PATCH] =?UTF-8?q?allTrainDiagram=E3=81=AE=E3=82=A2=E3=83=89?= =?UTF-8?q?=E3=83=AC=E3=82=B9=E6=8C=87=E5=AE=9A=E3=83=9F=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stateBox/useAllTrainDiagram.js | 6 +++--- stateBox/useCurrentTrain.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stateBox/useAllTrainDiagram.js b/stateBox/useAllTrainDiagram.js index 912aa37..a792222 100644 --- a/stateBox/useAllTrainDiagram.js +++ b/stateBox/useAllTrainDiagram.js @@ -15,12 +15,11 @@ export const AllTrainDiagramProvider = ({ children }) => { const customData = {}; useEffect(() => { fetch( - "http://n8n.haruk.in/webhook/CrowdTh%E2%82%AC71m3Ra7!ngLead%E2%82%ACr$" + "https://n8n.haruk.in/webhook/CrowdTh%E2%82%AC71m3Ra7!ngLead%E2%82%ACr$" ) .then((res) => res.json()) .then((res) => res.data) .then((res) => { - console.log(res); const data = {}; res.forEach((d) => { const keys = Object.keys(d); @@ -33,7 +32,8 @@ export const AllTrainDiagramProvider = ({ children }) => { setAllTrainDiagram(res); }) .catch((d) => { - alert("error"); + alert("allTrainDiagram取得エラー/再取得します"); + alert(d); fetch( "https://script.google.com/macros/s/AKfycbx_s7RB-xTy-iAslFJg7LfplLV09-hjDXEjdi9kCP_JT45wq17Af_IPOKIOqIfaNDg/exec" ) diff --git a/stateBox/useCurrentTrain.js b/stateBox/useCurrentTrain.js index adeb371..7a96cfb 100644 --- a/stateBox/useCurrentTrain.js +++ b/stateBox/useCurrentTrain.js @@ -38,6 +38,7 @@ export const CurrentTrainProvider = ({ children }) => { setCurrentTrainLoading("success"); }) .catch(() => { + alert("現在の全在線列車取得エラー/再取得します"); fetch( "https://script.google.com/macros/s/AKfycby9Y2-Bm75J_WkbZimi7iS8v5r9wMa9wtzpdwES9sOGF4i6HIYEJOM60W6gM1gXzt1o/exec", HeaderConfig