Browse Source

Fixing navigation to Profile screen

master
GabrielTrettel 3 years ago
parent
commit
1053f89828
  1. 43
      src/app/navigation/AppNavigator.js

43
src/app/navigation/AppNavigator.js

@ -8,10 +8,14 @@ import MessagesNavigator from "./MessagesNavigator";
import ForecastNavigator from "./ForecastNavigator"; import ForecastNavigator from "./ForecastNavigator";
import NewListingButton from "./NewListingButton"; import NewListingButton from "./NewListingButton";
import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator"; import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator";
import { NavigationContainer } from "@react-navigation/native";
import {createStackNavigator} from "@react-navigation/stack";
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
const Stack = createStackNavigator();
const AppNavigator = () => (
function tabScreens() {
return (
<Tab.Navigator style={{ backgroundColor: "white" }}> <Tab.Navigator style={{ backgroundColor: "white" }}>
<Tab.Screen <Tab.Screen
name="Home" name="Home"
@ -73,16 +77,35 @@ const AppNavigator = () => (
{/* }} */} {/* }} */}
{/* /> */} {/* /> */}
{/* <Tab.Screen */}
{/* name="Perfil" */}
{/* component={AccountNavigator} */}
{/* options={{ */}
{/* tabBarIcon: ({ color, size }) => ( */}
{/* <MaterialCommunityIcons name="account" color={color} size={size} /> */}
{/* ), */}
{/* }} */}
{/* /> */}
</Tab.Navigator> </Tab.Navigator>
);
}
const AppNavigator = () => (
<NavigationContainer
independent={true}
>
<Stack.Navigator>
<Stack.Screen
name="tab"
options={{ headerShown: false }}
component={tabScreens}
/>
<Stack.Screen
name="Perfil"
component={AccountNavigator}
options={{
headerShown: false,
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="account" color={color} size={size} />
),
}}
/>
</Stack.Navigator>
</NavigationContainer>
); );
export default AppNavigator; export default AppNavigator;
Loading…
Cancel
Save