11import  React  from  'react' ; 
22import  PropTypes  from  'prop-types' ; 
3- import  {  connect  }  from  'react-redux' ; 
4- 
53import  {  injectIntl ,  intlShape  }  from  '@edx/frontend-platform/i18n' ; 
64import  {  getConfig  }  from  '@edx/frontend-platform' ; 
7- import  {  AvatarButton  }  from  '@openedx/paragon' ; 
85
96// Local Components 
7+ import  {  AvatarButton  }  from  '@openedx/paragon' ; 
108import  UserMenuGroupSlot  from  './plugin-slots/UserMenuGroupSlot' ; 
119import  UserMenuGroupItemSlot  from  './plugin-slots/UserMenuGroupItemSlot' ; 
1210import  {  Menu ,  MenuTrigger ,  MenuContent  }  from  './Menu' ; 
1311import  {  LinkedLogo ,  Logo  }  from  './Logo' ; 
1412import  UserMenuItem  from  './common/UserMenuItem' ; 
15- import  Notifications  from  './Notifications' ; 
16- import  {  mapDispatchToProps ,  mapStateToProps  }  from  './data/selectors' ; 
13+ 
1714// i18n 
1815import  messages  from  './Header.messages' ; 
1916
@@ -23,20 +20,6 @@ import { MenuIcon } from './Icons';
2320class  MobileHeader  extends  React . Component  { 
2421  constructor ( props )  {  // eslint-disable-line no-useless-constructor 
2522    super ( props ) ; 
26-     this . state  =  { 
27-       locationHref : window . location . href , 
28-     } ; 
29-   } 
30- 
31-   componentDidMount ( )  { 
32-     this . props . fetchAppsNotificationCount ( ) ; 
33-   } 
34- 
35-   componentDidUpdate ( )  { 
36-     if  ( window . location . href  !==  this . state . locationHref )  { 
37-       this . setState ( {  locationHref : window . location . href  } ) ; 
38-       this . props . fetchAppsNotificationCount ( ) ; 
39-     } 
4023  } 
4124
4225  renderMenu ( menu )  { 
@@ -152,7 +135,6 @@ class MobileHeader extends React.Component {
152135      mainMenu, 
153136      userMenu, 
154137      loggedOutItems, 
155-       showNotificationsTray, 
156138    }  =  this . props ; 
157139    const  logoProps  =  {  src : logo ,  alt : logoAltText ,  href : logoDestination  } ; 
158140    const  stickyClassName  =  stickyOnMobile  ? 'sticky-top'  : '' ; 
@@ -191,7 +173,6 @@ class MobileHeader extends React.Component {
191173        </ div > 
192174        { userMenu . length  >  0  ||  loggedOutItems . length  >  0  ? ( 
193175          < div  className = "w-100 d-flex justify-content-end align-items-center" > 
194-             { showNotificationsTray  &&  loggedIn  &&  < Notifications  /> } 
195176            < Menu  tag = "nav"  aria-label = { intl . formatMessage ( messages [ 'header.label.secondary.nav' ] ) }  className = "position-static" > 
196177              < MenuTrigger 
197178                tag = { AvatarButton } 
@@ -246,8 +227,7 @@ MobileHeader.propTypes = {
246227  email : PropTypes . string , 
247228  loggedIn : PropTypes . bool , 
248229  stickyOnMobile : PropTypes . bool , 
249-   showNotificationsTray : PropTypes . bool , 
250-   fetchAppsNotificationCount : PropTypes . func . isRequired , 
230+ 
251231  // i18n 
252232  intl : intlShape . isRequired , 
253233} ; 
@@ -265,7 +245,7 @@ MobileHeader.defaultProps = {
265245  email : '' , 
266246  loggedIn : false , 
267247  stickyOnMobile : true , 
268-    showNotificationsTray :  false , 
248+ 
269249} ; 
270250
271- export  default  connect ( mapStateToProps ,   mapDispatchToProps ) ( injectIntl ( MobileHeader ) ) ; 
251+ export  default  injectIntl ( MobileHeader ) ; 
0 commit comments