diff --git a/components/ActionSheetComponents/EachTrainInfo/LandscapeTrainInfo.js b/components/ActionSheetComponents/EachTrainInfo/LandscapeTrainInfo.js index 96b8152..f6cadc9 100644 --- a/components/ActionSheetComponents/EachTrainInfo/LandscapeTrainInfo.js +++ b/components/ActionSheetComponents/EachTrainInfo/LandscapeTrainInfo.js @@ -21,7 +21,6 @@ export const LandscapeTrainInfo = (props) => { width: width / 2, }} > - {width / 2} {leftContent} { setTrainBus(); } setTrainBus(data[0]); - }, [currentStation]); + }, [currentStation, busAndTrainData]); const [usePDFView, setUsePDFView] = useState(undefined); useEffect(() => { diff --git a/components/Settings/settings.js b/components/Settings/settings.js index 7c8680e..e4c2b58 100644 --- a/components/Settings/settings.js +++ b/components/Settings/settings.js @@ -14,9 +14,7 @@ import { createStackNavigator } from "@react-navigation/stack"; import { TransitionPresets } from "@react-navigation/stack"; //import * as ExpoFelicaReader from "../../modules/expo-felica-reader/src"; import * as Updates from "expo-updates"; -import StatusbarDetect from "../../StatusbarDetect"; import { AS } from "../../storageControl"; -var Status = StatusbarDetect(); import { Switch } from "react-native-elements"; import AutoHeightImage from "react-native-auto-height-image"; import { SettingTopPage } from "./SettingTopPage"; diff --git a/components/trainbaseview.js b/components/trainbaseview.js index ca62447..39f7631 100644 --- a/components/trainbaseview.js +++ b/components/trainbaseview.js @@ -29,7 +29,9 @@ export default function TrainBase({ route }) { "https://train.jr-shikoku.co.jp", "https://train.jr-shikoku.co.jp/sp.html", ]} - onMessage={(event) => {}} + onMessage={() => { + // 必要に応じてメッセージ処理を実装 + }} mixedContentMode={"compatibility"} javaScriptEnabled injectedJavaScript={jss} diff --git a/ndView.tsx b/ndView.tsx index ef2d1ad..fa2ac7e 100644 --- a/ndView.tsx +++ b/ndView.tsx @@ -119,8 +119,10 @@ setInterval(() => { javaScriptEnabled={true} injectedJavaScript={jsa} pullToRefreshEnabled - onError={() => this.webView?.reload()} - onMessage={()=>{}} + onError={() => webview.current?.reload()} + onMessage={() => { + // 必要に応じてメッセージ処理を実装 + }} /> webview.current.reload()} diff --git a/stateBox/useNotifications.tsx b/stateBox/useNotifications.tsx index 3de055e..c8c8afc 100644 --- a/stateBox/useNotifications.tsx +++ b/stateBox/useNotifications.tsx @@ -117,12 +117,10 @@ export const NotificationProvider: FC = ({ children }) => { notificationListener.current = Notifications.addNotificationReceivedListener((notification) => { setNotification(notification); - }); - - responseListener.current = - Notifications.addNotificationResponseReceivedListener((response) => { - console.log(response); - }); + }); responseListener.current = + Notifications.addNotificationResponseReceivedListener((response) => { + // 通知レスポンスの処理 + }); return () => { notificationListener.current &&