Use the Icon component instead of directly using i tag

This commit is contained in:
Thibaut Girka
2019-09-09 16:41:41 +02:00
committed by ThibG
parent f154d9d6e9
commit 2aa0cdf7e6
32 changed files with 116 additions and 79 deletions

View File

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Icon from 'flavours/glitch/components/icon';
import { autoPlayGif, displayMedia } from 'flavours/glitch/util/initial_state';
import classNames from 'classnames';
import { decode } from 'blurhash';
@ -97,7 +98,7 @@ export default class MediaItem extends ImmutablePureComponent {
} else if (attachment.get('type') === 'audio') {
thumbnail = (
<span className='account-gallery__item__icons'>
<i className='fa fa-music' />
<Icon id='music' />
</span>
);
} else if (attachment.get('type') === 'image') {
@ -139,7 +140,7 @@ export default class MediaItem extends ImmutablePureComponent {
const icon = (
<span className='account-gallery__item__icons'>
<i className='fa fa-eye-slash' />
<Icon id='eye-slash' />
</span>
);