@@ -15,7 +15,8 @@ import {
15
15
CloudIcon ,
16
16
RssIcon ,
17
17
RectangleStackIcon ,
18
- CogIcon
18
+ CogIcon ,
19
+ LightBulbIcon
19
20
} from '@heroicons/react/24/solid' ;
20
21
import {
21
22
getDashboardLink ,
@@ -50,11 +51,6 @@ export default function Navbar({
50
51
const { toaster } = useToast ( ) ;
51
52
const confirmSeedModal = useRef < HTMLDialogElement | null > ( null ) ;
52
53
const [ seedInProgress , setSeedInProgress ] = useState < boolean > ( false ) ;
53
- const dashboardTitleAdmin = new Map ( [
54
- [ '/learning-insights' , 'Learning' ] ,
55
- [ '/knowledge-insights' , 'Knowledge' ] ,
56
- [ '/operational-insights' , 'Operational' ]
57
- ] ) ;
58
54
const dashboardTitleStudent = new Map ( [
59
55
[ '/trending-content' , 'Trending Content' ] ,
60
56
[ '/learning-path' , 'Learning Path' ] ,
@@ -109,42 +105,41 @@ export default function Navbar({
109
105
110
106
< div className = "h-full" >
111
107
< ul className = "menu h-full flex flex-col justify-between" >
112
- < div >
108
+ < div className = "mt-16" >
113
109
{ /* admin view */ }
114
110
{ user && isAdministrator ( user ) ? (
115
111
< >
116
- < li className = "mt-16" >
117
- < Link to = { getDashboardLink ( user ) } >
118
- < ULIComponent icon = { HomeIcon } />
119
- { dashboardTitleAdmin . get (
120
- getDashboardLink ( user )
121
- ) ?? 'Operational' } { ' ' }
122
- Insights
123
- </ Link >
124
- </ li >
125
112
{ hasFeature (
126
113
user ,
127
114
FeatureAccess . OpenContentAccess
128
- ) &&
129
- user . feature_access . length > 1 && (
130
- < li >
131
- < Link to = "/knowledge-insights" >
132
- < ULIComponent
133
- icon = { BookOpenIcon }
134
- />
135
- Knowledge Insights
136
- </ Link >
137
- </ li >
138
- ) }
139
- { /* this acts as the dashboard in the case there are no features enabled */ }
140
- { user . feature_access . length > 0 && (
115
+ ) && (
141
116
< li >
142
- < Link to = "/operational -insights" >
143
- < ULIComponent icon = { CogIcon } />
144
- Operational Insights
117
+ < Link to = "/knowledge -insights" >
118
+ < ULIComponent icon = { BookOpenIcon } />
119
+ Knowledge Insights
145
120
</ Link >
146
121
</ li >
147
122
) }
123
+ { hasFeature (
124
+ user ,
125
+ FeatureAccess . ProviderAccess
126
+ ) && (
127
+ < li >
128
+ < Link to = "/learning-insights" >
129
+ < ULIComponent
130
+ icon = { LightBulbIcon }
131
+ />
132
+ Learning Insights
133
+ </ Link >
134
+ </ li >
135
+ ) }
136
+ { /* this acts as the dashboard in the case there are no features enabled */ }
137
+ < li >
138
+ < Link to = "/operational-insights" >
139
+ < ULIComponent icon = { CogIcon } />
140
+ Operational Insights
141
+ </ Link >
142
+ </ li >
148
143
{ hasFeature (
149
144
user ,
150
145
FeatureAccess . ProviderAccess
0 commit comments