From adc6e2520ccfe10ed660b4a4ca3e8fef8b13fb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor=20da=20Silva?= Date: Sat, 20 Nov 2021 18:14:22 -0300 Subject: [PATCH] fix(drawer-navigator): fixes problem that did not allow the side menu to open fix #20 --- package.json | 4 ++-- src/components/Header/index.tsx | 2 +- src/routes/tab.routes.tsx | 32 +++++++++++++++----------------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 5b1923f..46e5a6b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 28e73b1..0d9c99b 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -16,7 +16,7 @@ const Header: React.FC = () => { { - navigation.dispatch(DrawerActions.openDrawer); + navigation.dispatch(DrawerActions.openDrawer()); }} > diff --git a/src/routes/tab.routes.tsx b/src/routes/tab.routes.tsx index f832d02..1bce618 100644 --- a/src/routes/tab.routes.tsx +++ b/src/routes/tab.routes.tsx @@ -75,23 +75,21 @@ function HomeTabs() { const AppRoutes: React.FC = () => { return ( - - - - - - - + + + + + ); };