react_native/donutshop/app/index.js

32 lines
1.2 KiB
JavaScript

import React from 'react';
import { KeyboardAvoidingView, SafeAreaView, View} from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from '@react-navigation/stack';
import HomeNavigator from "./navigation/HomeNavigator";
import Detail from "./screen/Detail";
import Payment from "./screen/Payment";
import Inbox from "./screen/Inbox";
import Profile from "./screen/Profile";
import DetailDrink from "./screen/DetailDrink.tsx";
const Stack = createStackNavigator();
export default function Index() {
return (
<NavigationContainer independent={true}>
<KeyboardAvoidingView>
<View style={{height: '100%', width: '100%'}}>
<Stack.Navigator screenOptions={{headerShown: false}}>
<Stack.Screen name='Tab' component={HomeNavigator}/>
<Stack.Screen name='detail' component={Detail}/>
<Stack.Screen name='detailDrink' component={DetailDrink}/>
<Stack.Screen name='payment' component={Payment}/>
<Stack.Screen name='inbox' component={Inbox}/>
<Stack.Screen name='profile' component={Profile}/>
</Stack.Navigator>
</View>
</KeyboardAvoidingView>
</NavigationContainer>
);
}