@@ -12,7 +12,7 @@ import { navigateDashboard } from '../actions/projectActions'
1212const Sidebar = ( ) => {
1313 const dispatch = useDispatch ( )
1414
15- const { panel } = useSelector ( ( state ) => state . config )
15+ const { area } = useSelector ( ( state ) => state . config )
1616 const { project } = useSelector ( ( state ) => state . project )
1717
1818 const catalog = project ?. catalogs . find ( catalog => catalog . id == project . project . catalog )
@@ -21,23 +21,23 @@ const Sidebar = () => {
2121 {
2222 title : '' ,
2323 items : [
24- { panel : 'dashboard' , name : gettext ( 'Dashboard' ) , icon : 'bi-grid' }
24+ { area : 'dashboard' , name : gettext ( 'Dashboard' ) , icon : 'bi-grid' }
2525 ] ,
2626 } ,
2727 {
2828 title : gettext ( 'Data management plan' ) ,
2929 items : [
30- { panel : 'interview' , name : gettext ( 'Interview' ) , icon : 'bi-clipboard-check' } ,
31- { panel : 'documents' , name : gettext ( 'Documents' ) , icon : 'bi-file-text' } ,
32- { panel : 'snapshots' , name : gettext ( 'Snapshots' ) , icon : 'bi-stack' } ,
30+ { area : 'interview' , name : gettext ( 'Interview' ) , icon : 'bi-clipboard-check' } ,
31+ { area : 'documents' , name : gettext ( 'Documents' ) , icon : 'bi-file-text' } ,
32+ { area : 'snapshots' , name : gettext ( 'Snapshots' ) , icon : 'bi-stack' } ,
3333 ] ,
3434 } ,
3535 {
3636 title : gettext ( 'Settings' ) ,
3737 items : [
38- { panel : 'information' , name : gettext ( 'Project information' ) , icon : 'bi-info-square' } ,
39- { panel : 'memberships' , name : gettext ( 'Membership' ) , icon : 'bi-people' } ,
40- { panel : 'plugins' , name : gettext ( 'Plugins' ) , icon : 'bi-wrench' } ,
38+ { area : 'information' , name : gettext ( 'Project information' ) , icon : 'bi-info-square' } ,
39+ { area : 'memberships' , name : gettext ( 'Membership' ) , icon : 'bi-people' } ,
40+ { area : 'plugins' , name : gettext ( 'Plugins' ) , icon : 'bi-wrench' } ,
4141 ] ,
4242 } ,
4343 ]
@@ -65,9 +65,9 @@ const Sidebar = () => {
6565 group . items . map ( ( item , itemIndex ) => (
6666 < Link
6767 key = { itemIndex }
68- href = { buildPath ( { panel : item . panel } ) }
69- className = { classnames ( 'nav-link' , { active : panel === item . panel } ) }
70- onClick = { ( ) => dispatch ( navigateDashboard ( { panel : item . panel } ) ) }
68+ href = { buildPath ( { area : item . area } ) }
69+ className = { classnames ( 'nav-link' , { active : area === item . area } ) }
70+ onClick = { ( ) => dispatch ( navigateDashboard ( { area : item . area } ) ) }
7171 >
7272 < div className = "d-flex align-items-center gap-2" >
7373 < i className = { `bi ${ item . icon } ` } > </ i >
0 commit comments