From 7dee21eb7228b1b787abda27ff85442264933930 Mon Sep 17 00:00:00 2001 From: Attiya Ishaque Date: Fri, 6 Jan 2023 15:01:57 +0500 Subject: [PATCH] fix: Remove the deprecated intlShape import and replace its occurrences with PropType.object. (#724) --- src/base-component/AuthLargeLayout.jsx | 4 ++-- src/base-component/AuthMediumLayout.jsx | 4 ++-- src/base-component/AuthSmallLayout.jsx | 4 ++-- src/base-component/LargeLayout.jsx | 5 +++-- src/base-component/MediumLayout.jsx | 5 +++-- src/base-component/SmallLayout.jsx | 5 +++-- src/common-components/EnterpriseSSO.jsx | 4 ++-- src/common-components/InstitutionLogistration.jsx | 4 ++-- src/common-components/Logistration.jsx | 4 ++-- src/common-components/PasswordField.jsx | 4 ++-- src/common-components/SocialAuthProviders.jsx | 4 ++-- src/common-components/ThirdPartyAuthAlert.jsx | 4 ++-- src/forgot-password/ForgotPasswordAlert.jsx | 4 ++-- src/forgot-password/ForgotPasswordPage.jsx | 4 ++-- src/login/AccountActivationMessage.jsx | 4 ++-- src/login/ChangePasswordPrompt.jsx | 4 ++-- src/login/LoginFailure.jsx | 4 ++-- src/login/LoginPage.jsx | 4 ++-- src/progressive-profiling/ProgressiveProfiling.jsx | 4 ++-- src/progressive-profiling/ProgressiveProfilingPageModal.jsx | 4 ++-- src/register/ConfigurableRegistrationForm.jsx | 4 ++-- src/register/RegistrationFailure.jsx | 4 ++-- src/register/RegistrationPage.jsx | 4 ++-- src/register/ThirdPartyAuth.jsx | 4 ++-- src/register/registrationFields/CountryField.jsx | 4 ++-- src/register/registrationFields/EmailField.jsx | 4 ++-- src/register/registrationFields/HonorCode.jsx | 4 ++-- src/register/registrationFields/TermsOfService.jsx | 4 ++-- src/register/registrationFields/UsernameField.jsx | 4 ++-- src/reset-password/ResetPasswordFailure.jsx | 4 ++-- src/reset-password/ResetPasswordPage.jsx | 4 ++-- src/reset-password/ResetPasswordSuccess.jsx | 5 +++-- 32 files changed, 68 insertions(+), 64 deletions(-) diff --git a/src/base-component/AuthLargeLayout.jsx b/src/base-component/AuthLargeLayout.jsx index bea59cf3..12030e46 100644 --- a/src/base-component/AuthLargeLayout.jsx +++ b/src/base-component/AuthLargeLayout.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Hyperlink, Image } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -39,7 +39,7 @@ const AuthLargeLayout = ({ intl, username }) => ( ); AuthLargeLayout.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, username: PropTypes.string.isRequired, }; diff --git a/src/base-component/AuthMediumLayout.jsx b/src/base-component/AuthMediumLayout.jsx index 7ef1f8ac..a118448e 100644 --- a/src/base-component/AuthMediumLayout.jsx +++ b/src/base-component/AuthMediumLayout.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Hyperlink, Image } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -42,7 +42,7 @@ const AuthMediumLayout = ({ intl, username }) => ( ); AuthMediumLayout.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, username: PropTypes.string.isRequired, }; diff --git a/src/base-component/AuthSmallLayout.jsx b/src/base-component/AuthSmallLayout.jsx index 543fb58b..7717a521 100644 --- a/src/base-component/AuthSmallLayout.jsx +++ b/src/base-component/AuthSmallLayout.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Hyperlink, Image } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -31,7 +31,7 @@ const AuthSmallLayout = ({ intl, username }) => ( ); AuthSmallLayout.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, username: PropTypes.string.isRequired, }; diff --git a/src/base-component/LargeLayout.jsx b/src/base-component/LargeLayout.jsx index ad0d345b..59df50e7 100644 --- a/src/base-component/LargeLayout.jsx +++ b/src/base-component/LargeLayout.jsx @@ -1,9 +1,10 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Hyperlink, Image } from '@edx/paragon'; import classNames from 'classnames'; +import PropTypes from 'prop-types'; import messages from './messages'; @@ -39,7 +40,7 @@ const LargeLayout = ({ intl }) => ( ); LargeLayout.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(LargeLayout); diff --git a/src/base-component/MediumLayout.jsx b/src/base-component/MediumLayout.jsx index 980367ab..2bc46e73 100644 --- a/src/base-component/MediumLayout.jsx +++ b/src/base-component/MediumLayout.jsx @@ -1,9 +1,10 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Hyperlink, Image } from '@edx/paragon'; import classNames from 'classnames'; +import PropTypes from 'prop-types'; import messages from './messages'; @@ -44,7 +45,7 @@ const MediumLayout = ({ intl }) => ( ); MediumLayout.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(MediumLayout); diff --git a/src/base-component/SmallLayout.jsx b/src/base-component/SmallLayout.jsx index 71d1a898..d185b1d1 100644 --- a/src/base-component/SmallLayout.jsx +++ b/src/base-component/SmallLayout.jsx @@ -1,9 +1,10 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Hyperlink, Image } from '@edx/paragon'; import classNames from 'classnames'; +import PropTypes from 'prop-types'; import messages from './messages'; @@ -33,7 +34,7 @@ const SmallLayout = ({ intl }) => ( ); SmallLayout.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(SmallLayout); diff --git a/src/common-components/EnterpriseSSO.jsx b/src/common-components/EnterpriseSSO.jsx index d89c2b4d..72ae2d43 100644 --- a/src/common-components/EnterpriseSSO.jsx +++ b/src/common-components/EnterpriseSSO.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Button, Form, } from '@edx/paragon'; @@ -100,7 +100,7 @@ EnterpriseSSO.propTypes = { loginUrl: PropTypes.string, registerUrl: PropTypes.string, }), - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(EnterpriseSSO); diff --git a/src/common-components/InstitutionLogistration.jsx b/src/common-components/InstitutionLogistration.jsx index cd5c17d2..b74e7804 100644 --- a/src/common-components/InstitutionLogistration.jsx +++ b/src/common-components/InstitutionLogistration.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Button, Hyperlink, Icon } from '@edx/paragon'; import { Institution } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -95,7 +95,7 @@ RenderInstitutionButton.defaultProps = { InstitutionLogistration.propTypes = { ...LogistrationProps, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, headingTitle: PropTypes.string, }; InstitutionLogistration.defaultProps = { diff --git a/src/common-components/Logistration.jsx b/src/common-components/Logistration.jsx index 10cd4c78..6032bd0b 100644 --- a/src/common-components/Logistration.jsx +++ b/src/common-components/Logistration.jsx @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { getConfig } from '@edx/frontend-platform'; import { sendPageEvent, sendTrackEvent } from '@edx/frontend-platform/analytics'; import { getAuthService } from '@edx/frontend-platform/auth'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Icon, Tab, @@ -107,7 +107,7 @@ const Logistration = (props) => { }; Logistration.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, selectedPage: PropTypes.string, backupRegistrationForm: PropTypes.func.isRequired, tpaProviders: PropTypes.shape({ diff --git a/src/common-components/PasswordField.jsx b/src/common-components/PasswordField.jsx index bcdc00ff..5f557f5d 100644 --- a/src/common-components/PasswordField.jsx +++ b/src/common-components/PasswordField.jsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Form, Icon, IconButton, OverlayTrigger, Tooltip, useToggle, } from '@edx/paragon'; @@ -100,7 +100,7 @@ PasswordField.propTypes = { handleBlur: PropTypes.func, handleFocus: PropTypes.func, handleChange: PropTypes.func, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, name: PropTypes.string.isRequired, showRequirements: PropTypes.bool, value: PropTypes.string.isRequired, diff --git a/src/common-components/SocialAuthProviders.jsx b/src/common-components/SocialAuthProviders.jsx index 81bb06c5..b08e9a57 100644 --- a/src/common-components/SocialAuthProviders.jsx +++ b/src/common-components/SocialAuthProviders.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { faSignInAlt } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import PropTypes from 'prop-types'; @@ -60,7 +60,7 @@ SocialAuthProviders.defaultProps = { }; SocialAuthProviders.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, referrer: PropTypes.string, socialAuthProviders: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string, diff --git a/src/common-components/ThirdPartyAuthAlert.jsx b/src/common-components/ThirdPartyAuthAlert.jsx index a7b0b35e..2537fbd9 100644 --- a/src/common-components/ThirdPartyAuthAlert.jsx +++ b/src/common-components/ThirdPartyAuthAlert.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Alert } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -45,7 +45,7 @@ ThirdPartyAuthAlert.defaultProps = { ThirdPartyAuthAlert.propTypes = { currentProvider: PropTypes.string, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, referrer: PropTypes.string, }; diff --git a/src/forgot-password/ForgotPasswordAlert.jsx b/src/forgot-password/ForgotPasswordAlert.jsx index 4eb8e787..9b9a76c4 100644 --- a/src/forgot-password/ForgotPasswordAlert.jsx +++ b/src/forgot-password/ForgotPasswordAlert.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n'; import { Alert } from '@edx/paragon'; import { CheckCircle, Error } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -93,7 +93,7 @@ ForgotPasswordAlert.defaultProps = { ForgotPasswordAlert.propTypes = { status: PropTypes.string.isRequired, email: PropTypes.string, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, emailError: PropTypes.string, }; diff --git a/src/forgot-password/ForgotPasswordPage.jsx b/src/forgot-password/ForgotPasswordPage.jsx index aa4a946a..624dc7c3 100644 --- a/src/forgot-password/ForgotPasswordPage.jsx +++ b/src/forgot-password/ForgotPasswordPage.jsx @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { getConfig } from '@edx/frontend-platform'; import { sendPageEvent, sendTrackEvent } from '@edx/frontend-platform/analytics'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Form, Hyperlink, @@ -168,7 +168,7 @@ ForgotPasswordPage.propTypes = { email: PropTypes.string, emailValidationError: PropTypes.string, forgotPassword: PropTypes.func.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, setForgotPasswordFormData: PropTypes.func.isRequired, status: PropTypes.string, submitState: PropTypes.string, diff --git a/src/login/AccountActivationMessage.jsx b/src/login/AccountActivationMessage.jsx index 22c7329c..35bbf230 100644 --- a/src/login/AccountActivationMessage.jsx +++ b/src/login/AccountActivationMessage.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n'; import { Alert } from '@edx/paragon'; import { CheckCircle, Error } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -70,7 +70,7 @@ const AccountActivationMessage = (props) => { AccountActivationMessage.propTypes = { messageType: PropTypes.string.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(AccountActivationMessage); diff --git a/src/login/ChangePasswordPrompt.jsx b/src/login/ChangePasswordPrompt.jsx index 765e1bc8..324372e8 100644 --- a/src/login/ChangePasswordPrompt.jsx +++ b/src/login/ChangePasswordPrompt.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { ActionRow, ModalDialog, useToggle, } from '@edx/paragon'; @@ -80,7 +80,7 @@ ChangePasswordPrompt.defaultProps = { }; ChangePasswordPrompt.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, variant: PropTypes.oneOf(['nudge', 'block']), redirectUrl: PropTypes.string, }; diff --git a/src/login/LoginFailure.jsx b/src/login/LoginFailure.jsx index 483c28c3..9485b328 100644 --- a/src/login/LoginFailure.jsx +++ b/src/login/LoginFailure.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; import { getAuthService } from '@edx/frontend-platform/auth'; -import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n'; import { Alert, Hyperlink } from '@edx/paragon'; import { Error } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -193,7 +193,7 @@ LoginFailureMessage.propTypes = { errorCode: PropTypes.string, redirectUrl: PropTypes.string, }), - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(LoginFailureMessage); diff --git a/src/login/LoginPage.jsx b/src/login/LoginPage.jsx index 21152309..46205007 100644 --- a/src/login/LoginPage.jsx +++ b/src/login/LoginPage.jsx @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { getConfig } from '@edx/frontend-platform'; import { sendPageEvent, sendTrackEvent } from '@edx/frontend-platform/analytics'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Form, Hyperlink, Icon, StatefulButton, } from '@edx/paragon'; @@ -369,7 +369,7 @@ LoginPage.defaultProps = { LoginPage.propTypes = { getThirdPartyAuthContext: PropTypes.func.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, loginError: PropTypes.objectOf(PropTypes.any), loginRequest: PropTypes.func.isRequired, loginRequestFailure: PropTypes.func.isRequired, diff --git a/src/progressive-profiling/ProgressiveProfiling.jsx b/src/progressive-profiling/ProgressiveProfiling.jsx index 944e8156..cc21f33b 100644 --- a/src/progressive-profiling/ProgressiveProfiling.jsx +++ b/src/progressive-profiling/ProgressiveProfiling.jsx @@ -10,7 +10,7 @@ import { getAuthenticatedUser, hydrateAuthenticatedUser, } from '@edx/frontend-platform/auth'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { getLoggingService } from '@edx/frontend-platform/logging'; import { Alert, @@ -197,7 +197,7 @@ const ProgressiveProfiling = (props) => { ProgressiveProfiling.propTypes = { formRenderState: PropTypes.string.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, location: PropTypes.shape({ state: PropTypes.object, }), diff --git a/src/progressive-profiling/ProgressiveProfilingPageModal.jsx b/src/progressive-profiling/ProgressiveProfilingPageModal.jsx index 4d4b4a1b..11689a94 100644 --- a/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +++ b/src/progressive-profiling/ProgressiveProfilingPageModal.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { ActionRow, Button, ModalDialog } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -47,7 +47,7 @@ const ProgressiveProfilingPageModal = (props) => { }; ProgressiveProfilingPageModal.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, isOpen: PropTypes.bool, redirectUrl: PropTypes.string.isRequired, }; diff --git a/src/register/ConfigurableRegistrationForm.jsx b/src/register/ConfigurableRegistrationForm.jsx index da83c553..ffec16c1 100644 --- a/src/register/ConfigurableRegistrationForm.jsx +++ b/src/register/ConfigurableRegistrationForm.jsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import PropTypes from 'prop-types'; import FormFieldRenderer from '../field-renderer'; @@ -213,7 +213,7 @@ ConfigurableRegistrationForm.propTypes = { honor_code: PropTypes.bool, marketingEmailsOptIn: PropTypes.bool, }).isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, setFieldErrors: PropTypes.func.isRequired, setFocusedField: PropTypes.func.isRequired, setFormFields: PropTypes.func.isRequired, diff --git a/src/register/RegistrationFailure.jsx b/src/register/RegistrationFailure.jsx index d9ed255e..7ddbc013 100644 --- a/src/register/RegistrationFailure.jsx +++ b/src/register/RegistrationFailure.jsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Alert } from '@edx/paragon'; import { Error } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -56,7 +56,7 @@ RegistrationFailureMessage.propTypes = { }), errorCode: PropTypes.string.isRequired, failureCount: PropTypes.number.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(RegistrationFailureMessage); diff --git a/src/register/RegistrationPage.jsx b/src/register/RegistrationPage.jsx index 19a060b2..5eec3476 100644 --- a/src/register/RegistrationPage.jsx +++ b/src/register/RegistrationPage.jsx @@ -6,7 +6,7 @@ import { connect } from 'react-redux'; import { getConfig, snakeCaseObject } from '@edx/frontend-platform'; import { sendPageEvent } from '@edx/frontend-platform/analytics'; import { - getCountryList, getLocale, injectIntl, intlShape, + getCountryList, getLocale, injectIntl, } from '@edx/frontend-platform/i18n'; import { Form, StatefulButton } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -616,7 +616,7 @@ RegistrationPage.propTypes = { extendedProfile: PropTypes.arrayOf(PropTypes.string), fieldDescriptions: PropTypes.shape({}), institutionLogin: PropTypes.bool.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, optionalFields: PropTypes.shape({}), registrationErrorCode: PropTypes.string, registrationResult: PropTypes.shape({ diff --git a/src/register/ThirdPartyAuth.jsx b/src/register/ThirdPartyAuth.jsx index 52814caa..83afe999 100644 --- a/src/register/ThirdPartyAuth.jsx +++ b/src/register/ThirdPartyAuth.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import PropTypes from 'prop-types'; import Skeleton from 'react-loading-skeleton'; @@ -64,7 +64,7 @@ ThirdPartyAuth.defaultProps = { ThirdPartyAuth.propTypes = { currentProvider: PropTypes.string, handleInstitutionLogin: PropTypes.func.isRequired, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, providers: PropTypes.arrayOf(PropTypes.any), secondaryProviders: PropTypes.arrayOf(PropTypes.any), thirdPartyAuthApiStatus: PropTypes.string, diff --git a/src/register/registrationFields/CountryField.jsx b/src/register/registrationFields/CountryField.jsx index e310d2f7..b6e71a8c 100644 --- a/src/register/registrationFields/CountryField.jsx +++ b/src/register/registrationFields/CountryField.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Icon, IconButton } from '@edx/paragon'; import { ExpandLess, ExpandMore } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -174,7 +174,7 @@ const CountryField = (props) => { CountryField.propTypes = { countryList: PropTypes.arrayOf(PropTypes.object).isRequired, errorMessage: PropTypes.string, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, onBlurHandler: PropTypes.func.isRequired, onChangeHandler: PropTypes.func.isRequired, onFocusHandler: PropTypes.func.isRequired, diff --git a/src/register/registrationFields/EmailField.jsx b/src/register/registrationFields/EmailField.jsx index 6ca744eb..fc2c50be 100644 --- a/src/register/registrationFields/EmailField.jsx +++ b/src/register/registrationFields/EmailField.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Alert, Icon } from '@edx/paragon'; import { Close, Error } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -73,7 +73,7 @@ EmailField.propTypes = { suggestion: PropTypes.string, type: PropTypes.string, }), - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, value: PropTypes.string.isRequired, handleOnClose: PropTypes.func.isRequired, handleSuggestionClick: PropTypes.func.isRequired, diff --git a/src/register/registrationFields/HonorCode.jsx b/src/register/registrationFields/HonorCode.jsx index d7809c09..3046ae65 100644 --- a/src/register/registrationFields/HonorCode.jsx +++ b/src/register/registrationFields/HonorCode.jsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n'; import { Form, Hyperlink } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -85,7 +85,7 @@ HonorCode.defaultProps = { }; HonorCode.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, errorMessage: PropTypes.string, onChangeHandler: PropTypes.func, fieldType: PropTypes.string, diff --git a/src/register/registrationFields/TermsOfService.jsx b/src/register/registrationFields/TermsOfService.jsx index 04def3ab..4a42fd4f 100644 --- a/src/register/registrationFields/TermsOfService.jsx +++ b/src/register/registrationFields/TermsOfService.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { getConfig } from '@edx/frontend-platform'; -import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n'; import { Form, Hyperlink } from '@edx/paragon'; import PropTypes from 'prop-types'; @@ -52,7 +52,7 @@ TermsOfService.defaultProps = { }; TermsOfService.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, errorMessage: PropTypes.string, onChangeHandler: PropTypes.func.isRequired, value: PropTypes.bool, diff --git a/src/register/registrationFields/UsernameField.jsx b/src/register/registrationFields/UsernameField.jsx index ddbf0d51..44cb760a 100644 --- a/src/register/registrationFields/UsernameField.jsx +++ b/src/register/registrationFields/UsernameField.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Button, Icon, IconButton } from '@edx/paragon'; import { Close } from '@edx/paragon/icons'; import PropTypes, { string } from 'prop-types'; @@ -65,7 +65,7 @@ UsernameField.propTypes = { handleSuggestionClick: PropTypes.func.isRequired, handleUsernameSuggestionClose: PropTypes.func.isRequired, errorMessage: PropTypes.string, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, name: PropTypes.string.isRequired, value: PropTypes.string.isRequired, autoComplete: PropTypes.string, diff --git a/src/reset-password/ResetPasswordFailure.jsx b/src/reset-password/ResetPasswordFailure.jsx index e196a1b2..fd8a285f 100644 --- a/src/reset-password/ResetPasswordFailure.jsx +++ b/src/reset-password/ResetPasswordFailure.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Alert } from '@edx/paragon'; import { Error } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; @@ -51,7 +51,7 @@ ResetPasswordFailure.defaultProps = { ResetPasswordFailure.propTypes = { errorCode: PropTypes.string, errorMsg: PropTypes.string, - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(ResetPasswordFailure); diff --git a/src/reset-password/ResetPasswordPage.jsx b/src/reset-password/ResetPasswordPage.jsx index 1a2e3b0f..f8531667 100644 --- a/src/reset-password/ResetPasswordPage.jsx +++ b/src/reset-password/ResetPasswordPage.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { getConfig, getQueryParameters } from '@edx/frontend-platform'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Form, Icon, @@ -224,7 +224,7 @@ ResetPasswordPage.defaultProps = { }; ResetPasswordPage.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, resetPassword: PropTypes.func.isRequired, validateToken: PropTypes.func.isRequired, token: PropTypes.string, diff --git a/src/reset-password/ResetPasswordSuccess.jsx b/src/reset-password/ResetPasswordSuccess.jsx index 3b1bc19f..1f7c7ae9 100644 --- a/src/reset-password/ResetPasswordSuccess.jsx +++ b/src/reset-password/ResetPasswordSuccess.jsx @@ -1,7 +1,8 @@ import React from 'react'; -import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { injectIntl } from '@edx/frontend-platform/i18n'; import { Alert } from '@edx/paragon'; +import PropTypes from 'prop-types'; import messages from './messages'; @@ -19,7 +20,7 @@ const ResetPasswordSuccess = (props) => { }; ResetPasswordSuccess.propTypes = { - intl: intlShape.isRequired, + intl: PropTypes.objectOf(PropTypes.object).isRequired, }; export default injectIntl(ResetPasswordSuccess);