From 0c35fb24e944532a1929acb3f269ac2c4f4127ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Wed, 14 Sep 2022 19:51:58 -0300 Subject: [PATCH] Fix navigation issue --- src/app/data.js | 2 +- src/components/MainMenu/index.js | 2 +- src/screens/Home/index.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/data.js b/src/app/data.js index 64e1b43..5dcaee3 100644 --- a/src/app/data.js +++ b/src/app/data.js @@ -10,7 +10,7 @@ import { const avatarMenuOptions = (navigate, logout) => [ { text: 'Meu Perfil', - action: () => navigate('/profile', { replace: true }), + action: () => navigate('/profile'), }, { text: 'Sair', diff --git a/src/components/MainMenu/index.js b/src/components/MainMenu/index.js index b6ac820..ab07d76 100644 --- a/src/components/MainMenu/index.js +++ b/src/components/MainMenu/index.js @@ -51,7 +51,7 @@ function MainMenu({ options, layoutType }) { onChange={(_, newValue) => { const newOption = options.find(option => option.id === newValue); setSelectedOption(newOption); - navigate(newOption.pathname, { replace: true }); + navigate(newOption.pathname); }} sx={navigator} showLabels diff --git a/src/screens/Home/index.js b/src/screens/Home/index.js index 913de6b..4c1cbc4 100644 --- a/src/screens/Home/index.js +++ b/src/screens/Home/index.js @@ -30,11 +30,11 @@ function Home() { }, [fetchAllAssignments]); const onClickClassCard = id => { - navigate(`/class/${id}`, { replace: true }); + navigate(`/class/${id}`); }; const onClickAssignmentCard = id => { - navigate(`/assignment/${id}`, { replace: true }); + navigate(`/assignment/${id}`); }; return (