diff --git a/Apps.js b/Apps.js index c0420ed..fc48352 100644 --- a/Apps.js +++ b/Apps.js @@ -9,6 +9,7 @@ import { import { WebView } from "react-native-webview"; import Constants from "expo-constants"; import AsyncStorage from "@react-native-async-storage/async-storage"; +import { news } from "./config/newsUpdate"; /* import StatusbarDetect from './StatusbarDetect'; var Status = StatusbarDetect(); */ @@ -799,7 +800,7 @@ modal_observer.observe(modal_content, { useEffect(() => { AsyncStorage.getItem("status") .then((d) => { - if (d != "2022/06/11") { + if (d != news) { navigate("news"); } }) diff --git a/components/news.js b/components/news.js index 31c4d3d..b9883d4 100644 --- a/components/news.js +++ b/components/news.js @@ -3,6 +3,7 @@ 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 { @@ -13,7 +14,7 @@ export default function News(props) { { - AsyncStorage.setItem("status", "2022/06/11"); + AsyncStorage.setItem("status", news); navigate("Apps"); }} > diff --git a/config/newsUpdate.js b/config/newsUpdate.js new file mode 100644 index 0000000..ef3405d --- /dev/null +++ b/config/newsUpdate.js @@ -0,0 +1 @@ +export const news = "2022-6-11";