diff --git a/MenuPage.js b/MenuPage.js index 6f00ec3..5102368 100644 --- a/MenuPage.js +++ b/MenuPage.js @@ -84,11 +84,15 @@ export function MenuPage() { setFavoriteStation(returnData); } }) - .catch((d) => console.log(d)); + .catch((error) => { + if (__DEV__) { + console.warn('お気に入り駅の読み込みに失敗しました:', error); + } + }); }); return unsubscribe; - }, [navigation, mapHeight]); + }, [navigation, mapHeight, favoriteStation, setFavoriteStation]); return ( { return ( setActionSheetHorizonalScroll(true)} - //onScrollEndDrag={() => setActionSheetHorizonalScroll(false)} - //onScrollBeginDrag={() => console.log("onScrollBeginDrag")} style={{ flexDirection: "row", - //width: widthPercentageToDP("200%"), - // minHeight: 200, - //height: heightPercentageToDP("20%"), }} horizontal pagingEnabled diff --git a/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js b/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js index 1f68b85..3c474ab 100644 --- a/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js +++ b/components/ActionSheetComponents/EachTrainInfo/ShortHeader.js @@ -11,15 +11,9 @@ export const ShortHeader = ({ }) => { return ( setActionSheetHorizonalScroll(true)} - //onScrollEndDrag={() => setActionSheetHorizonalScroll(false)} - //onScrollBeginDrag={() => console.log("onScrollBeginDrag")} style={{ flexDirection: "row", flex: 1, - //width: widthPercentageToDP("200%"), - // minHeight: 200, - //height: heightPercentageToDP("20%"), }} horizontal pagingEnabled diff --git a/index.js b/index.js index 00631d6..dc98efe 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ -import 'babel-polyfill'; import { registerRootComponent } from "expo"; import { registerWidgetTaskHandler } from "react-native-android-widget"; import { Platform } from "react-native"; diff --git a/lib/eachTrainInfoCoreLib/findReversalPoints.js b/lib/eachTrainInfoCoreLib/findReversalPoints.js index 5981d75..7e4b7f6 100644 --- a/lib/eachTrainInfoCoreLib/findReversalPoints.js +++ b/lib/eachTrainInfoCoreLib/findReversalPoints.js @@ -46,6 +46,6 @@ export const findReversalPoints = (array, stopStationIDList) => { return allThroughStation; } } catch (e) { - console.log(e); + // エラーが発生した場合は空の配列を返す } }; diff --git a/package.json b/package.json index a5f8cbb..a1145ee 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "android": "expo start --android", "ios": "expo start --ios", "eject": "expo eject", - "pushWeb":"npx expo export -p web && netlify deploy --dir dist --prod", + "pushWeb": "npx expo export -p web && netlify deploy --dir dist --prod", "checkDiagram": "bash ./check.sh" }, "dependencies": { diff --git a/stateBox/useCurrentTrain.js b/stateBox/useCurrentTrain.js index 15f6b44..fed4dc3 100644 --- a/stateBox/useCurrentTrain.js +++ b/stateBox/useCurrentTrain.js @@ -62,7 +62,7 @@ export const CurrentTrainProvider = ({ children }) => { setCurrentTrainLoading("success"); }) .catch(() => { - console.log("えらー"); + // エラー時の処理 setCurrentTrainLoading("error"); }); }); diff --git a/stateBox/useFavoriteStation.tsx b/stateBox/useFavoriteStation.tsx index d4f5893..9ec7668 100644 --- a/stateBox/useFavoriteStation.tsx +++ b/stateBox/useFavoriteStation.tsx @@ -42,7 +42,12 @@ export const FavoriteStationProvider:FC = ({ children }) => { const returnData = JSON.parse(d); setFavoriteStation(returnData); }) - .catch((d) => console.log(d)); + .catch((error) => { + // エラーログを記録(開発時のみ) + if (__DEV__) { + console.warn('お気に入り駅の読み込みに失敗しました:', error); + } + }); }, []); return (