Files
jrshikoku/howto.js
2025-01-05 10:26:19 +00:00

28 lines
817 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 }) => {
const { info, goTo, useShow } = route.params;
const { goBack } = useNavigation();
const onExit = () => {
if(goTo != "NearTrainDiagramView") {
navigate(goTo || "Apps");
useShow && useShow();
} else {
goBack();
}
};
return (
<View style={styles}>
<WebView
useWebKit
source={{ uri: info.replace("http://", "https://") }}
/>
<BigButton onPress={onExit} string="閉じる" />
</View>
);
};
const styles = { height: "100%", backgroundColor: "#0099CC" };