6.0 update init
This commit is contained in:
18
MenuPage.js
18
MenuPage.js
@@ -1,8 +1,6 @@
|
||||
import React, { useEffect } from "react";
|
||||
import {
|
||||
createStackNavigator,
|
||||
TransitionPresets,
|
||||
} from "@react-navigation/stack";
|
||||
import { createStackNavigator } from "@react-navigation/stack";
|
||||
import { CommonActions } from "@react-navigation/native";
|
||||
import { AS } from "./storageControl";
|
||||
import TrainBase from "./components/trainbaseview";
|
||||
import HowTo from "./howto";
|
||||
@@ -20,7 +18,8 @@ export function MenuPage() {
|
||||
const { favoriteStation, setFavoriteStation } = useFavoriteStation();
|
||||
const { getCurrentTrain } = useCurrentTrain();
|
||||
const navigation = useNavigation();
|
||||
const { addListener } = navigation;
|
||||
const { addListener, dispatch } = navigation;
|
||||
dispatch(CommonActions.preload("positions"));
|
||||
useEffect(() => {
|
||||
AS.getItem("startPage")
|
||||
.then((res) => {
|
||||
@@ -67,13 +66,8 @@ export function MenuPage() {
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="trainbase"
|
||||
options={{ ...optionData, gestureResponseDistance: { vertical: 300 } }}
|
||||
children={(props) => <TrainBase {...props} />}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="currentTrainIDList"
|
||||
options={{ ...optionData, gestureResponseDistance: { vertical: 300 } }}
|
||||
component={CurrentTrainListView}
|
||||
options={{ ...optionData }}
|
||||
component={TrainBase}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="AllTrainIDList"
|
||||
|
Reference in New Issue
Block a user