jrshikoku/howto.js
harukin-expo-dev-env 74ff188d84 部分的web対応
2025-03-04 10:38:04 +00:00

30 lines
848 B
JavaScript

import React from "react";
import { View } from "react-native";
import { WebView } from "react-native-webview";
import { BigButton } from "./components/atom/BigButton";
import { useNavigation } from "@react-navigation/native";
export default ({ navigation: { navigate }, route }) => {
if (!route.params) {
return null
}
const { info, goTo, useShow } = route.params;
const { goBack } = useNavigation();
const onExit = () => {
if (goTo != "NearTrainDiagramView") {
//navigate(goTo || "Apps");
useShow && useShow();
}
goBack();
};
return (
<View style={styles}>
<WebView
useWebKit
source={{ uri: info.replace("http://", "https://") }}
/>
<BigButton onPress={onExit} string="閉じる" />
</View>
);
};
const styles = { height: "100%", backgroundColor: "#0099CC" };