diff --git a/webapp/channels/src/components/claim/components/oauth_to_email.tsx b/webapp/channels/src/components/claim/components/oauth_to_email.tsx index c5af9d5243..cc4dcb6284 100644 --- a/webapp/channels/src/components/claim/components/oauth_to_email.tsx +++ b/webapp/channels/src/components/claim/components/oauth_to_email.tsx @@ -3,16 +3,13 @@ import classNames from 'classnames'; import React, {useRef, useState} from 'react'; -import {FormattedMessage} from 'react-intl'; +import {FormattedMessage, useIntl} from 'react-intl'; import type {AuthChangeResponse} from '@mattermost/types/users'; import {oauthToEmail} from 'actions/admin_actions.jsx'; -import LocalizedInput from 'components/localized_input/localized_input'; - import Constants from 'utils/constants'; -import {t} from 'utils/i18n'; import {isValidPassword, localizeMessage, toTitleCase} from 'utils/utils'; import type {getPasswordConfig} from 'utils/utils'; @@ -26,6 +23,7 @@ type Props = { } const OAuthToEmail = (props: Props) => { + const intl = useIntl(); const passwordInput = useRef(null); const passwordConfirmInput = useRef(null); @@ -72,8 +70,6 @@ const OAuthToEmail = (props: Props) => { }; const uiType = `${(props.currentType === Constants.SAML_SERVICE ? Constants.SAML_SERVICE.toUpperCase() : toTitleCase(props.currentType || ''))} SSO`; - const placeholderPasswordMessage = {id: t('claim.oauth_to_email.newPwd'), defaultMessage: 'New Password'}; - const placeholderConfirmMessage = {id: t('claim.oauth_to_email.confirm'), defaultMessage: 'Confirm Password'}; return ( <> @@ -99,22 +95,28 @@ const OAuthToEmail = (props: Props) => { />

-
-