jrshikoku/components/news.tsx
harukin-expo-dev-env 77328bf97a 修正
2025-01-30 13:27:15 +00:00

31 lines
858 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 { goBack } = 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);
goBack();
}}
string="更新情報を閉じる"
/>
</View>
);
};
export default News;