29 lines
886 B
JavaScript
29 lines
886 B
JavaScript
import * as React from 'react';
|
|
import { Button, View, Text } from 'react-native';
|
|
import { createStackNavigator } from '@react-navigation/stack';
|
|
|
|
import MainMenuTab from './tab.js';
|
|
|
|
const Stack = createStackNavigator();
|
|
|
|
const navOptions = () => ({
|
|
headerShown: false
|
|
})
|
|
|
|
function ModalScreen({ navigation }) {
|
|
return (
|
|
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
|
<Text style={{ fontSize: 30 }}>This is a modal!</Text>
|
|
<Button onPress={() => navigation.goBack()} title="Dismiss" />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
export default function PromoStack(navigation) {
|
|
return (
|
|
<Stack.Navigator initialRouteName="MainMenuDrawer" mode="modal" >
|
|
<Stack.Screen name="MainMenu" key="MainMenuDrawer" component={MainMenuTab} options={navOptions} />
|
|
<Stack.Screen name="LogoutModal" component={ModalScreen} />
|
|
</Stack.Navigator>
|
|
)
|
|
} |