File tree Expand file tree Collapse file tree 8 files changed +20
-8
lines changed Expand file tree Collapse file tree 8 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ LOGO_WHITE_URL=https://edx-cdn.org/v3/prod/logo-white.svg
22
22
FAVICON_URL = https://edx-cdn.org/v3/prod/favicon.ico
23
23
NOTIFICATION_FEEDBACK_URL = ' '
24
24
CAREERS_URL = ' '
25
+ STUDIO_BASE_URL = ' '
Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ LOGO_WHITE_URL=https://edx-cdn.org/v3/prod/logo-white.svg
22
22
FAVICON_URL = https://edx-cdn.org/v3/prod/favicon.ico
23
23
NOTIFICATION_FEEDBACK_URL = ' '
24
24
CAREERS_URL = ' '
25
+ STUDIO_BASE_URL = ' '
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ DesktopHeader.propTypes = {
207
207
items : PropTypes . arrayOf ( PropTypes . shape ( {
208
208
type : PropTypes . oneOf ( [ 'item' , 'menu' ] ) ,
209
209
href : PropTypes . string ,
210
- content : PropTypes . string ,
210
+ content : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
211
211
disabled : PropTypes . bool ,
212
212
isActive : PropTypes . bool ,
213
213
onClick : PropTypes . func ,
@@ -255,8 +255,8 @@ DesktopHeader.defaultProps = {
255
255
email : '' ,
256
256
loggedIn : false ,
257
257
notificationAppData : {
258
- apps : { } ,
259
- tabsCount : { } ,
258
+ apps : { } ,
259
+ tabsCount : { } ,
260
260
appsId : [ ] ,
261
261
isNewNotificationViewEnabled : false ,
262
262
notificationExpiryDays : 0 ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ ensureConfig([
28
28
'LOGO_URL' ,
29
29
'ACCOUNT_SETTINGS_URL' ,
30
30
'NOTIFICATION_FEEDBACK_URL' ,
31
+ 'STUDIO_BASE_URL' ,
31
32
] , 'Header component' ) ;
32
33
33
34
subscribe ( APP_CONFIG_INITIALIZED , ( ) => {
@@ -188,6 +189,7 @@ const Header = ({
188
189
secondaryMenu : getConfig ( ) . MINIMAL_HEADER || getConfig ( ) . AUTHN_MINIMAL_HEADER ? [ ] : secondaryMenu ,
189
190
userMenu : getConfig ( ) . AUTHN_MINIMAL_HEADER ? [ ] : userMenu ,
190
191
loggedOutItems : getConfig ( ) . AUTHN_MINIMAL_HEADER ? [ ] : loggedOutItems ,
192
+ studioBaseUrl : config . STUDIO_BASE_URL ,
191
193
} ;
192
194
193
195
if ( enterpriseCustomerBrandingConfig ) {
Original file line number Diff line number Diff line change @@ -84,7 +84,15 @@ export function useNotification() {
84
84
isNewNotificationViewEnabled,
85
85
} ;
86
86
} catch ( error ) {
87
- return { notificationStatus : RequestStatus . FAILED } ;
87
+ return {
88
+ notificationStatus : RequestStatus . FAILED ,
89
+ apps : { } ,
90
+ appsId : [ ] ,
91
+ isNewNotificationViewEnabled : false ,
92
+ notificationExpiryDays : 0 ,
93
+ showNotificationsTray : false ,
94
+ tabsCount : { count : 0 } ,
95
+ } ;
88
96
}
89
97
} , [ normalizeNotificationCounts ] ) ;
90
98
Original file line number Diff line number Diff line change @@ -230,8 +230,8 @@ Notifications.propTypes = {
230
230
Notifications . defaultProps = {
231
231
showLeftMargin : true ,
232
232
notificationAppData : {
233
- apps : { } ,
234
- tabsCount : { } ,
233
+ apps : { } ,
234
+ tabsCount : { count : 0 } ,
235
235
appsId : [ ] ,
236
236
isNewNotificationViewEnabled : false ,
237
237
notificationExpiryDays : 0 ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const MobileMenu = ({
20
20
>
21
21
< ul className = "p-0" style = { { listStyleType : 'none' } } >
22
22
{ items . map ( item => (
23
- < li className = "mobile-menu-item" >
23
+ < li className = "mobile-menu-item" key = { ` ${ id } - ${ item . title } ` } >
24
24
< a href = { item . href } >
25
25
{ item . title }
26
26
</ a >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ NavDropdownMenu.propTypes = {
47
47
id : PropTypes . string . isRequired ,
48
48
email : PropTypes . string ,
49
49
name : PropTypes . string ,
50
- buttonTitle : PropTypes . string . isRequired ,
50
+ buttonTitle : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) . isRequired ,
51
51
items : PropTypes . arrayOf ( PropTypes . shape ( {
52
52
href : PropTypes . string ,
53
53
title : PropTypes . string ,
You can’t perform that action at this time.
0 commit comments