mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-10-01 11:17:58 +03:00
move modal options to container
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import {StatusBar} from "expo-status-bar";
|
||||
import {useColorScheme, View} from "react-native";
|
||||
import {Server, WalletCards} from "lucide-react-native";
|
||||
import {Platform, useColorScheme, View} from "react-native";
|
||||
import {NavigationContainer} from "@react-navigation/native";
|
||||
import {SafeAreaProvider} from "react-native-safe-area-context";
|
||||
import {MD3Colors} from "react-native-paper/lib/typescript/types";
|
||||
@@ -121,7 +121,7 @@ export default function AppRoot() {
|
||||
|
||||
<Stack.Group screenOptions={{presentation: "modal"}}>
|
||||
<Stack.Screen name="add-server" component={ServerAddModal} options={{title: "Add Server"}}/>
|
||||
<Stack.Screen name="add-card" component={CardAddModal} options={{title: "Add Card"}}/>
|
||||
<Stack.Screen name="add-card" component={CardAddModal} options={{title: "Add Card", headerShown: Platform.OS !== 'ios'}}/>
|
||||
<Stack.Screen name="edit-card" component={CardEditorModal} options={{title: "Edit Card"}}/>
|
||||
</Stack.Group>
|
||||
</Stack.Navigator>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import NfcManager from "react-native-nfc-manager";
|
||||
|
||||
import React, {useEffect, useState} from "react";
|
||||
import {Platform, TouchableOpacity, View} from "react-native";
|
||||
import React, {useEffect, useLayoutEffect, useState} from "react";
|
||||
import {createNativeStackNavigator} from "@react-navigation/native-stack";
|
||||
|
||||
import {Card, Paragraph, Text, Title, useTheme} from "react-native-paper";
|
||||
@@ -26,12 +27,6 @@ function CardAddMethodSelector({navigation}) {
|
||||
const theme = useTheme();
|
||||
const [nfcSupported, setNfcSupported] = useState<boolean | null>(null);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
navigation.setOptions({
|
||||
headerShown: false
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
NfcManager.isSupported().then(setNfcSupported);
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user