Skip to content

Commit

Permalink
fix(drawer-navigator): fixes problem that did not allow the side menu…
Browse files Browse the repository at this point in the history
… to open

fix #20
  • Loading branch information
joaovds committed Nov 20, 2021
1 parent df42ec8 commit adc6e25
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@react-native-community/datetimepicker": "^3.5.2",
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/picker": "^1.8.1",
"@react-navigation/drawer": "^5.12.9",
"@react-navigation/drawer": "^5.x",
"@react-navigation/material-bottom-tabs": "^5.3.15",
"@react-navigation/native": "^5.9.4",
"@react-navigation/native": "^5.x",
"@react-navigation/stack": "^5.14.5",
"@typescript-eslint/parser": "^4.28.5",
"@unform/core": "^1.9.8",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Header: React.FC = () => {
<TouchableOpacity
activeOpacity={0.8}
onPress={() => {
navigation.dispatch(DrawerActions.openDrawer);
navigation.dispatch(DrawerActions.openDrawer());
}}
>
<MenuIcon name="menu" />
Expand Down
32 changes: 15 additions & 17 deletions src/routes/tab.routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,21 @@ function HomeTabs() {

const AppRoutes: React.FC = () => {
return (
<NavigationContainer independent>
<StackRoutes.Navigator
headerMode="none"
screenOptions={{
cardStyle: {
backgroundColor: colors.light.background,
},
}}
>
<StackRoutes.Screen name="HomeTabs" component={HomeTabs} />
<StackRoutes.Screen name="Project" component={Project} />
<StackRoutes.Screen
name="DetailRestaurant"
component={DetailRestaurant}
/>
</StackRoutes.Navigator>
</NavigationContainer>
<StackRoutes.Navigator
headerMode="none"
screenOptions={{
cardStyle: {
backgroundColor: colors.light.background,
},
}}
>
<StackRoutes.Screen name="HomeTabs" component={HomeTabs} />
<StackRoutes.Screen name="Project" component={Project} />
<StackRoutes.Screen
name="DetailRestaurant"
component={DetailRestaurant}
/>
</StackRoutes.Navigator>
);
};

Expand Down

0 comments on commit adc6e25

Please sign in to comment.