修正
This commit is contained in:
parent
48a8dba1c0
commit
343a0ad06e
2
App.js
2
App.js
@ -25,7 +25,7 @@ if (Platform.OS === "android") {
|
|||||||
}
|
}
|
||||||
export default function App() {
|
export default function App() {
|
||||||
const navigationRef = useRef();
|
const navigationRef = useRef();
|
||||||
useEffect(() => UpdateAsync(), []);
|
useEffect(UpdateAsync, []);
|
||||||
return (
|
return (
|
||||||
<NavigationContainer name="Root" ref={navigationRef} style={{ flex: 1 }}>
|
<NavigationContainer name="Root" ref={navigationRef} style={{ flex: 1 }}>
|
||||||
<Tab.Navigator>
|
<Tab.Navigator>
|
||||||
|
@ -14,15 +14,9 @@ export default function Setting(props) {
|
|||||||
const [mapSwitch, setMapSwitch] = useState(undefined);
|
const [mapSwitch, setMapSwitch] = useState(undefined);
|
||||||
const [stationMenu, setStationMenu] = useState(undefined);
|
const [stationMenu, setStationMenu] = useState(undefined);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
AsyncStorage.getItem("iconSwitch").then((d) => {
|
AsyncStorage.getItem("iconSwitch").then(setIconSetting);
|
||||||
setIconSetting(d);
|
AsyncStorage.getItem("mapSwitch").then(setMapSwitch);
|
||||||
});
|
AsyncStorage.getItem("stationSwitch").then(setStationMenu);
|
||||||
AsyncStorage.getItem("mapSwitch").then((d) => {
|
|
||||||
setMapSwitch(d);
|
|
||||||
});
|
|
||||||
AsyncStorage.getItem("stationSwitch").then((d) => {
|
|
||||||
setStationMenu(d);
|
|
||||||
});
|
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user