newsを変数管理式に変更
This commit is contained in:
@@ -1,19 +1,45 @@
|
||||
import React, { } from 'react';
|
||||
import {View,Text,TouchableOpacity } from 'react-native';
|
||||
import {WebView} from 'react-native-webview';
|
||||
import StatusbarDetect from '../StatusbarDetect';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import React from "react";
|
||||
import { View, Text, TouchableOpacity } from "react-native";
|
||||
import { WebView } from "react-native-webview";
|
||||
import StatusbarDetect from "../StatusbarDetect";
|
||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||
import { news } from "../config/newsUpdate";
|
||||
var Status = StatusbarDetect();
|
||||
export default function News(props){
|
||||
const { navigation: { navigate } } = props;
|
||||
return(
|
||||
<View style={{height:"100%",backgroundColor:"#0099CC"}}>
|
||||
<WebView useWebKit={true} source={{uri: 'https://nexcloud.haruk.in/sites/press-harukin/JRShikokuApps/2022-6-11'}} mixedContentMode={'compatibility'} javaScriptEnabled={true}/>
|
||||
<TouchableOpacity style={{padding:10,flexDirection:"row",borderColor:"white",borderWidth:1,margin:10,borderRadius:5,alignItems:"center"}} onPress={()=>{AsyncStorage.setItem('status', "2022/04/14");navigate('Apps');}}>
|
||||
<View style={{flex:1}} />
|
||||
<Text style={{fontSize:25,fontWeight:"bold",color:"white"}}>更新情報を閉じる</Text>
|
||||
<View style={{flex:1}} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
export default function News(props) {
|
||||
const {
|
||||
navigation: { navigate },
|
||||
} = props;
|
||||
return (
|
||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||
<WebView
|
||||
useWebKit={true}
|
||||
source={{
|
||||
uri: `https://nexcloud.haruk.in/sites/press-harukin/JRShikokuApps/${news}`,
|
||||
}}
|
||||
mixedContentMode={"compatibility"}
|
||||
javaScriptEnabled={true}
|
||||
/>
|
||||
<TouchableOpacity
|
||||
style={{
|
||||
padding: 10,
|
||||
flexDirection: "row",
|
||||
borderColor: "white",
|
||||
borderWidth: 1,
|
||||
margin: 10,
|
||||
borderRadius: 5,
|
||||
alignItems: "center",
|
||||
}}
|
||||
onPress={() => {
|
||||
AsyncStorage.setItem("status", news);
|
||||
navigate("Apps");
|
||||
}}
|
||||
>
|
||||
<View style={{ flex: 1 }} />
|
||||
<Text style={{ fontSize: 25, fontWeight: "bold", color: "white" }}>
|
||||
更新情報を閉じる
|
||||
</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user