File tree Expand file tree Collapse file tree
src/modules/core/components/Dashboard/Navbar Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 "delete" : " delete" ,
2929 "closeModal" : " Close modal" ,
3030 "report" : " report" ,
31- "seeMore" : " See more"
31+ "seeMore" : " See more" ,
32+ "goBack" : " Go back"
3233 },
3334 "navbar" : {
3435 "tooltip" : {
9798 "informations" : " Activate the dark mode to preserve your eyes."
9899 }
99100 }
100- }
101+ }
Original file line number Diff line number Diff line change 2828 "delete" : " supprimer" ,
2929 "report" : " signaler" ,
3030 "closeModal" : " Fermer la modale" ,
31- "seeMore" : " Voir Plus"
31+ "seeMore" : " Voir Plus" ,
32+ "goBack" : " Retour"
3233 },
3334 "navbar" : {
3435 "tooltip" : {
9394 "informations" : " Activer le mode sombre pour préserver vos yeux."
9495 }
9596 }
96- }
97+ }
Original file line number Diff line number Diff line change 11import { ManageSearch , Person , Settings } from '@mui/icons-material'
22import {
3+ Button ,
34 IconButton ,
45 List ,
56 ListItemButton ,
67 ListItemIcon ,
78 ListItemText ,
89 Stack ,
910 Tooltip ,
11+ Typography ,
1012 useTheme ,
1113} from '@mui/material'
1214import Box from '@mui/material/Box'
1315import React , { PropsWithChildren , useEffect } from 'react'
14- import { Link as RouterLink , useLocation } from 'react-router-dom'
16+ import { Link as RouterLink , useLocation , useHistory } from 'react-router-dom'
1517
1618import { Icon } from '@core/components/Icon/Icon.component'
1719import { Logo } from '@core/components/Logo/Logo.component'
@@ -70,6 +72,11 @@ export const DashboardNavbar: React.FC<PropsWithChildren<{}>> = () => {
7072 }
7173 } , [ ] )
7274
75+ const history = useHistory ( )
76+ const goBack = ( ) => {
77+ history . goBack ( )
78+ }
79+
7380 return (
7481 < RootStyle >
7582 < ToolbarStyle ref = { toolBarRef } >
@@ -100,6 +107,20 @@ export const DashboardNavbar: React.FC<PropsWithChildren<{}>> = () => {
100107 < Icon name = "eva:menu-fill" />
101108 </ Box >
102109 < Logo />
110+ < Typography
111+ variant = "caption"
112+ sx = { {
113+ color : 'grey.500' ,
114+ alignSelf : 'center' ,
115+ paddingX : 2 ,
116+ cursor : 'pointer' ,
117+ fontSize : '0.8rem' ,
118+ textTransform : 'uppercase' ,
119+ } }
120+ onClick = { goBack }
121+ >
122+ { t ( 'actions.goBack' ) }
123+ </ Typography >
103124 < Box sx = { { flexGrow : 1 } } />
104125 < Stack
105126 direction = "row"
You can’t perform that action at this time.
0 commit comments