GithubCopilotリファクタリング2

This commit is contained in:
harukin-expo-dev-env 2025-07-15 04:51:50 +00:00
parent 3ac0edd3ad
commit 8a1b8c94f3
6 changed files with 12 additions and 13 deletions

View File

@ -21,7 +21,6 @@ export const LandscapeTrainInfo = (props) => {
width: width / 2, width: width / 2,
}} }}
> >
<Text>{width / 2}</Text>
{leftContent} {leftContent}
</View> </View>
<ScrollView <ScrollView

View File

@ -36,7 +36,7 @@ export const StationDeteilView = (props) => {
setTrainBus(); setTrainBus();
} }
setTrainBus(data[0]); setTrainBus(data[0]);
}, [currentStation]); }, [currentStation, busAndTrainData]);
const [usePDFView, setUsePDFView] = useState(undefined); const [usePDFView, setUsePDFView] = useState(undefined);
useEffect(() => { useEffect(() => {

View File

@ -14,9 +14,7 @@ import { createStackNavigator } from "@react-navigation/stack";
import { TransitionPresets } from "@react-navigation/stack"; import { TransitionPresets } from "@react-navigation/stack";
//import * as ExpoFelicaReader from "../../modules/expo-felica-reader/src"; //import * as ExpoFelicaReader from "../../modules/expo-felica-reader/src";
import * as Updates from "expo-updates"; import * as Updates from "expo-updates";
import StatusbarDetect from "../../StatusbarDetect";
import { AS } from "../../storageControl"; import { AS } from "../../storageControl";
var Status = StatusbarDetect();
import { Switch } from "react-native-elements"; import { Switch } from "react-native-elements";
import AutoHeightImage from "react-native-auto-height-image"; import AutoHeightImage from "react-native-auto-height-image";
import { SettingTopPage } from "./SettingTopPage"; import { SettingTopPage } from "./SettingTopPage";

View File

@ -29,7 +29,9 @@ export default function TrainBase({ route }) {
"https://train.jr-shikoku.co.jp", "https://train.jr-shikoku.co.jp",
"https://train.jr-shikoku.co.jp/sp.html", "https://train.jr-shikoku.co.jp/sp.html",
]} ]}
onMessage={(event) => {}} onMessage={() => {
// 必要に応じてメッセージ処理を実装
}}
mixedContentMode={"compatibility"} mixedContentMode={"compatibility"}
javaScriptEnabled javaScriptEnabled
injectedJavaScript={jss} injectedJavaScript={jss}

View File

@ -119,8 +119,10 @@ setInterval(() => {
javaScriptEnabled={true} javaScriptEnabled={true}
injectedJavaScript={jsa} injectedJavaScript={jsa}
pullToRefreshEnabled pullToRefreshEnabled
onError={() => this.webView?.reload()} onError={() => webview.current?.reload()}
onMessage={()=>{}} onMessage={() => {
// 必要に応じてメッセージ処理を実装
}}
/> />
<ReloadButton <ReloadButton
onPress={() => webview.current.reload()} onPress={() => webview.current.reload()}

View File

@ -117,12 +117,10 @@ export const NotificationProvider: FC<Props> = ({ children }) => {
notificationListener.current = notificationListener.current =
Notifications.addNotificationReceivedListener((notification) => { Notifications.addNotificationReceivedListener((notification) => {
setNotification(notification); setNotification(notification);
}); }); responseListener.current =
Notifications.addNotificationResponseReceivedListener((response) => {
responseListener.current = // 通知レスポンスの処理
Notifications.addNotificationResponseReceivedListener((response) => { });
console.log(response);
});
return () => { return () => {
notificationListener.current && notificationListener.current &&