起動画面設定機能を追加:6.0以降の変更点のメモを追加

This commit is contained in:
harukin-expo-dev-env
2025-01-05 17:40:16 +00:00
parent 08d105588f
commit da0e8428d9
7 changed files with 30 additions and 19 deletions

View File

@@ -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>
);
}