StackNavigation.js 1.43 KB
import React from 'react';
import {createStackNavigator} from "@react-navigation/stack";
import Gallery from "../screens/Gallery";
import Main from "../screens/Main";
import TabNavigation from "./TabNavigation";
import {TouchableOpacity} from "react-native";
// import * as WebBrowser from 'expo-web-browser';
import {Ionicons} from "@expo/vector-icons";
import SelectOrTakePhotoStackNavigation from "./SelectOrTakePhotoStackNavigation";


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

const StackNavigation = () =>{
    return (
        <Stack.Navigator
            mode='card'
            screenOptions = {{
                headerRight: () => {
                    return (
                        <TouchableOpacity>
                            <Ionicons name={'logo-youtube'} color={'red'} size={25}/>
                        </TouchableOpacity>
                    )
                }
            }}
        >
            <Stack.Screen
                name='TabNavigation'
                component={TabNavigation}
            />
            <Stack.Screen
                name='SelectOrTakePhotoStackNavigation'
                component={SelectOrTakePhotoStackNavigation}
            />
            <Stack.Screen
                name='Gallery'
                component={Gallery}
            />
        </Stack.Navigator>
    )
};

export default StackNavigation;