File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
React-frontend/src/components/Management Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 109
109
# SQLite data
110
110
flask-backend /api /db.sqlite3
111
111
* .db
112
+
113
+ # Misc
114
+ .DS_Store
Original file line number Diff line number Diff line change @@ -112,9 +112,9 @@ function Sidebar() {
112
112
113
113
// Other items
114
114
const otherItems = [
115
- [ 'Home' , < HomeIcon color = "secondary" /> ] ,
116
- [ 'Contact' , < ContactSupportIcon color = "secondary" /> ] ,
117
- [ 'About' , < InfoIcon color = "secondary" /> ]
115
+ [ 'Home' , < HomeIcon color = "secondary" /> , "/" ] ,
116
+ [ 'Contact' , < ContactSupportIcon color = "secondary" /> , "/contact" ] ,
117
+ [ 'About' , < InfoIcon color = "secondary" /> , "/about" ]
118
118
]
119
119
120
120
return (
@@ -202,10 +202,16 @@ function Sidebar() {
202
202
< Divider />
203
203
< List >
204
204
{ otherItems . map ( ( item , index ) => (
205
- < ListItem button key = { item [ 0 ] } >
206
- < ListItemIcon > { item [ 1 ] } </ ListItemIcon >
207
- < ListItemText primary = { item [ 0 ] } />
208
- </ ListItem >
205
+ < ListItem
206
+ button key = { item [ 0 ] }
207
+ className = {
208
+ ( location . pathname === item [ 2 ] ) ? classes . activeItem : null }
209
+ onClick = { ( ) => history . push ( item [ 2 ] )
210
+ }
211
+ >
212
+ < ListItemIcon > { item [ 1 ] } </ ListItemIcon >
213
+ < ListItemText primary = { item [ 0 ] } />
214
+ </ ListItem >
209
215
) ) }
210
216
</ List >
211
217
You can’t perform that action at this time.
0 commit comments