import {
    NavigationContainer
} from "@react-navigation/native";
import {
    createNativeStackNavigator
} from "@react-navigation/native-stack";
import Home from "../pages/home";
import TestSubPage from "../pages/testSubPage";

const RootStack = createNativeStackNavigator();

const RootNav = () => {
    return <RootStack.Navigator
        initialRouteName="Home"
    >
        <RootStack.Screen
            name="Home"
            component={Home}
        />
        <RootStack.Screen
            name="TestSubPage"
            component={TestSubPage}
        />
    </RootStack.Navigator>;
};

const Navigation = () => {
    return <NavigationContainer>
        <RootNav/>
    </NavigationContainer>;
};
export default Navigation;
