起動画面設定機能を追加:6.0以降の変更点のメモを追加
This commit is contained in:
16
MenuPage.js
16
MenuPage.js
@@ -21,6 +21,16 @@ export function MenuPage() {
|
||||
const { getCurrentTrain } = useCurrentTrain();
|
||||
const navigation = useNavigation();
|
||||
const { addListener } = navigation;
|
||||
useEffect(() => {
|
||||
AS.getItem("startPage")
|
||||
.then((res) => {
|
||||
if (res == "true") navigation.navigate("login");
|
||||
})
|
||||
.catch((e) => {
|
||||
//6.0以降false
|
||||
AS.setItem("startPage", "true");
|
||||
});
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
const unsubscribe = addListener("tabPress", (e) => {
|
||||
AS.getItem("favoriteStation")
|
||||
@@ -70,11 +80,7 @@ export function MenuPage() {
|
||||
options={{ ...optionData, gestureEnabled: false }}
|
||||
component={AllTrainDiagramView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="howto"
|
||||
options={optionData}
|
||||
component={HowTo}
|
||||
/>
|
||||
<Stack.Screen name="howto" options={optionData} component={HowTo} />
|
||||
</Stack.Navigator>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user