@@ -3,7 +3,7 @@ import { Alert, Button } from '@openedx/paragon';
33import PropTypes from 'prop-types' ;
44import { connect } from 'react-redux' ;
55import { useNavigate } from 'react-router-dom' ;
6- import { injectIntl , intlShape } from '@edx/frontend-platform/i18n' ;
6+ import { useIntl } from '@edx/frontend-platform/i18n' ;
77
88import {
99 BROWSE_AND_REQUEST_ALERT_COOKIE_PREFIX ,
@@ -18,7 +18,11 @@ import { ACCESS_TAB } from '../settings/data/constants';
1818 */
1919export const generateBrowseAndRequestAlertCookieName = ( enterpriseId ) => `${ BROWSE_AND_REQUEST_ALERT_COOKIE_PREFIX } -${ enterpriseId } ` ;
2020
21- const NewFeatureAlertBrowseAndRequest = ( { enterpriseId, enterpriseSlug, intl } ) => {
21+ const NewFeatureAlertBrowseAndRequest = ( {
22+ enterpriseId,
23+ enterpriseSlug,
24+ } ) => {
25+ const intl = useIntl ( ) ;
2226 const browseAndRequestAlertCookieName = generateBrowseAndRequestAlertCookieName ( enterpriseId ) ;
2327 const hideAlert = global . localStorage . getItem ( browseAndRequestAlertCookieName ) ;
2428
@@ -68,12 +72,11 @@ const NewFeatureAlertBrowseAndRequest = ({ enterpriseId, enterpriseSlug, intl })
6872NewFeatureAlertBrowseAndRequest . propTypes = {
6973 enterpriseId : PropTypes . string . isRequired ,
7074 enterpriseSlug : PropTypes . string . isRequired ,
71- intl : intlShape . isRequired ,
7275} ;
7376
7477const mapStateToProps = state => ( {
7578 enterpriseId : state . portalConfiguration . enterpriseId ,
7679 enterpriseSlug : state . portalConfiguration . enterpriseSlug ,
7780} ) ;
7881
79- export default connect ( mapStateToProps ) ( injectIntl ( NewFeatureAlertBrowseAndRequest ) ) ;
82+ export default connect ( mapStateToProps ) ( NewFeatureAlertBrowseAndRequest ) ;
0 commit comments