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, + }) ); };