[MM-55091] Replace usage of LocalizedIcon in 'add_users_to_group_modal.tsx' with i/span tags (#25202)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c111fba71e
Коммит
c91f85124c
@@ -37,18 +37,12 @@ exports[`component/add_users_to_group_modal should match snapshot 1`] = `
|
|||||||
closeLabel="Close"
|
closeLabel="Close"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
aria-label="Back"
|
||||||
className="modal-header-back-button btn btn-icon"
|
className="modal-header-back-button btn btn-icon"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<LocalizedIcon
|
<i
|
||||||
ariaLabel={
|
|
||||||
Object {
|
|
||||||
"defaultMessage": "Back",
|
|
||||||
"id": "user_groups_modal.goBackLabel",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
className="icon icon-arrow-left"
|
className="icon icon-arrow-left"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import React, {useState, useCallback, useMemo} from 'react';
|
import React, {useState, useCallback, useMemo} from 'react';
|
||||||
import {Modal} from 'react-bootstrap';
|
import {Modal} from 'react-bootstrap';
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage, useIntl} from 'react-intl';
|
||||||
|
|
||||||
import type {Group} from '@mattermost/types/groups';
|
import type {Group} from '@mattermost/types/groups';
|
||||||
import type {UserProfile} from '@mattermost/types/users';
|
import type {UserProfile} from '@mattermost/types/users';
|
||||||
@@ -11,9 +11,7 @@ import type {UserProfile} from '@mattermost/types/users';
|
|||||||
import type {ActionResult} from 'mattermost-redux/types/actions';
|
import type {ActionResult} from 'mattermost-redux/types/actions';
|
||||||
|
|
||||||
import AddUserToGroupMultiSelect from 'components/add_user_to_group_multiselect';
|
import AddUserToGroupMultiSelect from 'components/add_user_to_group_multiselect';
|
||||||
import LocalizedIcon from 'components/localized_icon';
|
|
||||||
|
|
||||||
import {t} from 'utils/i18n';
|
|
||||||
import {localizeMessage} from 'utils/utils';
|
import {localizeMessage} from 'utils/utils';
|
||||||
|
|
||||||
import type {ModalData} from 'types/actions';
|
import type {ModalData} from 'types/actions';
|
||||||
@@ -36,6 +34,7 @@ const AddUsersToGroupModal = (props: Props) => {
|
|||||||
const [saving, setSaving] = useState(false);
|
const [saving, setSaving] = useState(false);
|
||||||
const [usersToAdd, setUsersToAdd] = useState<UserProfile[]>([]);
|
const [usersToAdd, setUsersToAdd] = useState<UserProfile[]>([]);
|
||||||
const [showUnknownError, setShowUnknownError] = useState(false);
|
const [showUnknownError, setShowUnknownError] = useState(false);
|
||||||
|
const {formatMessage} = useIntl();
|
||||||
|
|
||||||
const doHide = useCallback(() => {
|
const doHide = useCallback(() => {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
@@ -104,13 +103,10 @@ const AddUsersToGroupModal = (props: Props) => {
|
|||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='modal-header-back-button btn btn-icon'
|
className='modal-header-back-button btn btn-icon'
|
||||||
aria-label='Close'
|
aria-label={formatMessage({id: 'user_groups_modal.goBackLabel', defaultMessage: 'Back'})}
|
||||||
onClick={goBack}
|
onClick={goBack}
|
||||||
>
|
>
|
||||||
<LocalizedIcon
|
<i className='icon icon-arrow-left'/>
|
||||||
className='icon icon-arrow-left'
|
|
||||||
ariaLabel={{id: t('user_groups_modal.goBackLabel'), defaultMessage: 'Back'}}
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
<Modal.Title
|
<Modal.Title
|
||||||
componentClass='h1'
|
componentClass='h1'
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user