This commit is contained in:
harukin-expo-dev-env
2024-08-20 03:31:47 +00:00
parent 4085ee3675
commit 229a7ffe5e
3 changed files with 18 additions and 23 deletions

6
Top.js
View File

@@ -13,7 +13,7 @@ import FavoriteList from "./components/FavoriteList.js";
import { optionData } from "./lib/stackOption.js";
import { useNavigation } from "@react-navigation/native";
import { useCurrentTrain } from "./stateBox/useCurrentTrain.js";
import { AS } from "./storageControl.js";
import { ASCore } from "./storageControl.js";
import { useTrainMenu } from "./stateBox/useTrainMenu";
const Stack = createStackNavigator();
export const Top = ({ navigationRef }) => {
@@ -28,10 +28,6 @@ export const Top = ({ navigationRef }) => {
getStationList2().then(setMapsStationData);
}, []);
const [mapSwitch, setMapSwitch] = React.useState("false");
const ASCore = ({ k, s, d }) =>
AS.getItem(k)
.then((d) => (d ? s(d) : AS.setItem(k, d)))
.catch(() => AS.setItem(k, d));
useEffect(() => {
//地図スイッチ
ASCore({ k: "mapSwitch", s: setMapSwitch, d: "false" });