Fix navigation issue
This commit is contained in:
parent
df251c0de3
commit
0c35fb24e9
3 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ import {
|
||||||
const avatarMenuOptions = (navigate, logout) => [
|
const avatarMenuOptions = (navigate, logout) => [
|
||||||
{
|
{
|
||||||
text: 'Meu Perfil',
|
text: 'Meu Perfil',
|
||||||
action: () => navigate('/profile', { replace: true }),
|
action: () => navigate('/profile'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Sair',
|
text: 'Sair',
|
||||||
|
|
|
@ -51,7 +51,7 @@ function MainMenu({ options, layoutType }) {
|
||||||
onChange={(_, newValue) => {
|
onChange={(_, newValue) => {
|
||||||
const newOption = options.find(option => option.id === newValue);
|
const newOption = options.find(option => option.id === newValue);
|
||||||
setSelectedOption(newOption);
|
setSelectedOption(newOption);
|
||||||
navigate(newOption.pathname, { replace: true });
|
navigate(newOption.pathname);
|
||||||
}}
|
}}
|
||||||
sx={navigator}
|
sx={navigator}
|
||||||
showLabels
|
showLabels
|
||||||
|
|
|
@ -30,11 +30,11 @@ function Home() {
|
||||||
}, [fetchAllAssignments]);
|
}, [fetchAllAssignments]);
|
||||||
|
|
||||||
const onClickClassCard = id => {
|
const onClickClassCard = id => {
|
||||||
navigate(`/class/${id}`, { replace: true });
|
navigate(`/class/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickAssignmentCard = id => {
|
const onClickAssignmentCard = id => {
|
||||||
navigate(`/assignment/${id}`, { replace: true });
|
navigate(`/assignment/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue