File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
2222FAVICON_URL = https://edx-cdn.org/v3/prod/favicon.ico
2323NOTIFICATION_FEEDBACK_URL = ' '
2424CAREERS_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
2222FAVICON_URL = https://edx-cdn.org/v3/prod/favicon.ico
2323NOTIFICATION_FEEDBACK_URL = ' '
2424CAREERS_URL = ' '
25+ STUDIO_BASE_URL = ' '
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ DesktopHeader.propTypes = {
207207 items : PropTypes . arrayOf ( PropTypes . shape ( {
208208 type : PropTypes . oneOf ( [ 'item' , 'menu' ] ) ,
209209 href : PropTypes . string ,
210- content : PropTypes . string ,
210+ content : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
211211 disabled : PropTypes . bool ,
212212 isActive : PropTypes . bool ,
213213 onClick : PropTypes . func ,
@@ -255,8 +255,8 @@ DesktopHeader.defaultProps = {
255255 email : '' ,
256256 loggedIn : false ,
257257 notificationAppData : {
258- apps : { } ,
259- tabsCount : { } ,
258+ apps : { } ,
259+ tabsCount : { } ,
260260 appsId : [ ] ,
261261 isNewNotificationViewEnabled : false ,
262262 notificationExpiryDays : 0 ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ ensureConfig([
2828 'LOGO_URL' ,
2929 'ACCOUNT_SETTINGS_URL' ,
3030 'NOTIFICATION_FEEDBACK_URL' ,
31+ 'STUDIO_BASE_URL' ,
3132] , 'Header component' ) ;
3233
3334subscribe ( APP_CONFIG_INITIALIZED , ( ) => {
@@ -188,6 +189,7 @@ const Header = ({
188189 secondaryMenu : getConfig ( ) . MINIMAL_HEADER || getConfig ( ) . AUTHN_MINIMAL_HEADER ? [ ] : secondaryMenu ,
189190 userMenu : getConfig ( ) . AUTHN_MINIMAL_HEADER ? [ ] : userMenu ,
190191 loggedOutItems : getConfig ( ) . AUTHN_MINIMAL_HEADER ? [ ] : loggedOutItems ,
192+ studioBaseUrl : config . STUDIO_BASE_URL ,
191193 } ;
192194
193195 if ( enterpriseCustomerBrandingConfig ) {
Original file line number Diff line number Diff line change @@ -84,7 +84,15 @@ export function useNotification() {
8484 isNewNotificationViewEnabled,
8585 } ;
8686 } 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+ } ;
8896 }
8997 } , [ normalizeNotificationCounts ] ) ;
9098
Original file line number Diff line number Diff line change @@ -230,8 +230,8 @@ Notifications.propTypes = {
230230Notifications . defaultProps = {
231231 showLeftMargin : true ,
232232 notificationAppData : {
233- apps : { } ,
234- tabsCount : { } ,
233+ apps : { } ,
234+ tabsCount : { count : 0 } ,
235235 appsId : [ ] ,
236236 isNewNotificationViewEnabled : false ,
237237 notificationExpiryDays : 0 ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const MobileMenu = ({
2020 >
2121 < ul className = "p-0" style = { { listStyleType : 'none' } } >
2222 { items . map ( item => (
23- < li className = "mobile-menu-item" >
23+ < li className = "mobile-menu-item" key = { ` ${ id } - ${ item . title } ` } >
2424 < a href = { item . href } >
2525 { item . title }
2626 </ a >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ NavDropdownMenu.propTypes = {
4747 id : PropTypes . string . isRequired ,
4848 email : PropTypes . string ,
4949 name : PropTypes . string ,
50- buttonTitle : PropTypes . string . isRequired ,
50+ buttonTitle : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) . isRequired ,
5151 items : PropTypes . arrayOf ( PropTypes . shape ( {
5252 href : PropTypes . string ,
5353 title : PropTypes . string ,
You can’t perform that action at this time.
0 commit comments