From 5c78405bf20e78c08fb6fcc3829ac106a34176b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Tue, 21 Jun 2022 08:58:36 -0300 Subject: [PATCH] Fix small nagivation bugs --- src/AuthenticatedApp.js | 1 + src/context/user.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/AuthenticatedApp.js b/src/AuthenticatedApp.js index 3e7d44d..2eaa883 100644 --- a/src/AuthenticatedApp.js +++ b/src/AuthenticatedApp.js @@ -60,6 +60,7 @@ function AuthenticatedApp() { } /> } /> } /> + } /> diff --git a/src/context/user.js b/src/context/user.js index f6b9bc3..291084c 100644 --- a/src/context/user.js +++ b/src/context/user.js @@ -57,7 +57,13 @@ function UserProvider(props) { const classrooms = () => { setState({ ...state, status: 'pending' }); getClassrooms(user.id).then(data => - setState({ status: 'success', user, classrooms: data.data, error: null }) + setState({ + status: 'success', + user, + classrooms: data.data, + error: null, + pathname, + }) ); };