@@ -3,7 +3,7 @@ import { Alert, Button } from '@openedx/paragon';
3
3
import PropTypes from 'prop-types' ;
4
4
import { connect } from 'react-redux' ;
5
5
import { useNavigate } from 'react-router-dom' ;
6
- import { injectIntl , intlShape } from '@edx/frontend-platform/i18n' ;
6
+ import { useIntl } from '@edx/frontend-platform/i18n' ;
7
7
8
8
import {
9
9
BROWSE_AND_REQUEST_ALERT_COOKIE_PREFIX ,
@@ -18,7 +18,11 @@ import { ACCESS_TAB } from '../settings/data/constants';
18
18
*/
19
19
export const generateBrowseAndRequestAlertCookieName = ( enterpriseId ) => `${ BROWSE_AND_REQUEST_ALERT_COOKIE_PREFIX } -${ enterpriseId } ` ;
20
20
21
- const NewFeatureAlertBrowseAndRequest = ( { enterpriseId, enterpriseSlug, intl } ) => {
21
+ const NewFeatureAlertBrowseAndRequest = ( {
22
+ enterpriseId,
23
+ enterpriseSlug,
24
+ } ) => {
25
+ const intl = useIntl ( ) ;
22
26
const browseAndRequestAlertCookieName = generateBrowseAndRequestAlertCookieName ( enterpriseId ) ;
23
27
const hideAlert = global . localStorage . getItem ( browseAndRequestAlertCookieName ) ;
24
28
@@ -68,12 +72,11 @@ const NewFeatureAlertBrowseAndRequest = ({ enterpriseId, enterpriseSlug, intl })
68
72
NewFeatureAlertBrowseAndRequest . propTypes = {
69
73
enterpriseId : PropTypes . string . isRequired ,
70
74
enterpriseSlug : PropTypes . string . isRequired ,
71
- intl : intlShape . isRequired ,
72
75
} ;
73
76
74
77
const mapStateToProps = state => ( {
75
78
enterpriseId : state . portalConfiguration . enterpriseId ,
76
79
enterpriseSlug : state . portalConfiguration . enterpriseSlug ,
77
80
} ) ;
78
81
79
- export default connect ( mapStateToProps ) ( injectIntl ( NewFeatureAlertBrowseAndRequest ) ) ;
82
+ export default connect ( mapStateToProps ) ( NewFeatureAlertBrowseAndRequest ) ;
0 commit comments