StackNavigation.js 2.13 KB
import React from 'react';
import {createStackNavigator} from "@react-navigation/stack";
import Gallery from "../screens/Gallery";
import Maps from "../screens/Maps";
import Main from "../screens/Main";
import TabNavigation from "./TabNavigation";
import {TouchableOpacity} from "react-native";
import {MaterialCommunityIcons} from "@expo/vector-icons";
import SelectOrTakePhotoStackNavigation from "./SelectOrTakePhotoStackNavigation";
import SetLocationStackNavigation from "./SetLocationStackNavigation";
import Profile from "../screens/Profile";
import Login from "../screens/Login";
import SignUp from "../screens/SignUp";

const Stack = createStackNavigator();
//
// const openBrowser = (url) => async () => {
//     await WebBrowser.openBrowserAsync(url);
// };

const StackNavigation = () => {
    return (
        <Stack.Navigator
            mode='card'
            screenOptions={{
                headerTitle: 'SGGO',
                headerRight: () => {
                    return (
                        <TouchableOpacity style={{marginRight: 5}}>
                            <MaterialCommunityIcons color={'grey'} name={'send'} size={24}/>
                        </TouchableOpacity>
                    )
                }
            }}
        >
            <Stack.Screen
                name='TabNavigation'
                component={TabNavigation}
            />
            <Stack.Screen
                name='SelectOrTakePhotoStackNavigation'
                component={SelectOrTakePhotoStackNavigation}
            />
            <Stack.Screen
                name='SetLocationStackNavigation'
                component={SetLocationStackNavigation}
            />
            <Stack.Screen
                name='Maps'
                component={Maps}
            />
            <Stack.Screen
                name='Gallery'
                component={Gallery}
            />

            <Stack.Screen
                name='Login'
                component={Login}
            />

            <Stack.Screen
                name='SignUp'
                component={SignUp}
            />
        </Stack.Navigator>
    )
};

export default StackNavigation;