@@ -10,7 +10,8 @@ import UserMenuGroupItemSlot from './plugin-slots/UserMenuGroupItemSlot';
1010import { Menu , MenuTrigger , MenuContent } from './Menu' ;
1111import { LinkedLogo , Logo } from './Logo' ;
1212import UserMenuItem from './common/UserMenuItem' ;
13-
13+ import withNotifications from './Notification/withNotifications' ;
14+ import Notifications from './Notification' ;
1415// i18n
1516import messages from './Header.messages' ;
1617
@@ -135,6 +136,7 @@ class MobileHeader extends React.Component {
135136 mainMenu,
136137 userMenu,
137138 loggedOutItems,
139+ notificationAppData,
138140 } = this . props ;
139141 const logoProps = { src : logo , alt : logoAltText , href : logoDestination } ;
140142 const stickyClassName = stickyOnMobile ? 'sticky-top' : '' ;
@@ -173,6 +175,7 @@ class MobileHeader extends React.Component {
173175 </ div >
174176 { userMenu . length > 0 || loggedOutItems . length > 0 ? (
175177 < div className = "w-100 d-flex justify-content-end align-items-center" >
178+ { notificationAppData ?. showNotificationsTray && < Notifications notificationAppData = { notificationAppData } /> }
176179 < Menu tag = "nav" aria-label = { intl . formatMessage ( messages [ 'header.label.secondary.nav' ] ) } className = "position-static" >
177180 < MenuTrigger
178181 tag = { AvatarButton }
@@ -227,7 +230,19 @@ MobileHeader.propTypes = {
227230 email : PropTypes . string ,
228231 loggedIn : PropTypes . bool ,
229232 stickyOnMobile : PropTypes . bool ,
230-
233+ notificationAppData : PropTypes . shape ( {
234+ apps : PropTypes . objectOf (
235+ PropTypes . arrayOf ( PropTypes . string ) ,
236+ ) . isRequired ,
237+ appsId : PropTypes . arrayOf ( PropTypes . string ) . isRequired ,
238+ isNewNotificationViewEnabled : PropTypes . bool . isRequired ,
239+ notificationExpiryDays : PropTypes . number . isRequired ,
240+ notificationStatus : PropTypes . string . isRequired ,
241+ showNotificationsTray : PropTypes . bool . isRequired ,
242+ tabsCount : PropTypes . shape ( {
243+ count : PropTypes . number . isRequired ,
244+ } ) . isRequired ,
245+ } ) ,
231246 // i18n
232247 intl : intlShape . isRequired ,
233248} ;
@@ -245,7 +260,15 @@ MobileHeader.defaultProps = {
245260 email : '' ,
246261 loggedIn : false ,
247262 stickyOnMobile : true ,
248-
263+ notificationAppData : {
264+ apps : { } ,
265+ tabsCount : { } ,
266+ appsId : [ ] ,
267+ isNewNotificationViewEnabled : false ,
268+ notificationExpiryDays : 0 ,
269+ notificationStatus : '' ,
270+ showNotificationsTray : false ,
271+ } ,
249272} ;
250273
251- export default injectIntl ( MobileHeader ) ;
274+ export default injectIntl ( withNotifications ( MobileHeader ) ) ;
0 commit comments