Files
jrshikoku/components/news.tsx
harukin-expo-dev-env 06ba5fe1de LEDの処理大整理
2024-09-09 13:50:20 +00:00

31 lines
868 B
TypeScript

import React, { FC } from "react";
import { View } from "react-native";
import { WebView } from "react-native-webview";
import { AS } from "../storageControl";
import { news } from "../config/newsUpdate";
import { useNavigation } from "@react-navigation/native";
import { BigButton } from "./atom/BigButton";
const News: FC = () => {
const { navigate } = useNavigation();
return (
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
<WebView
useWebKit={true}
source={{
uri: `https://xprocess.haruk.in/${news}`,
}}
mixedContentMode={"compatibility"}
javaScriptEnabled={true}
/>
<BigButton
onPress={() => {
AS.setItem("status", news);
navigate("Apps");
}}
string="更新情報を閉じる"
/>
</View>
);
};
export default News;