cleanup JS imports and other minor stuff
This commit is contained in:
parent
490c1a2244
commit
4452ddbc88
13 changed files with 15 additions and 45 deletions
|
|
@ -16,13 +16,12 @@ import { MediaGallery, Video, Audio } from '../features/ui/util/async-components
|
|||
import { HotKeys } from 'react-hotkeys';
|
||||
import classNames from 'classnames';
|
||||
import Icon from 'mastodon/components/icon';
|
||||
import { displayMedia } from '../initial_state';
|
||||
import { displayMedia, visibleReactions } from '../initial_state';
|
||||
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
|
||||
|
||||
// We use the component (and not the container) since we do not want
|
||||
// to use the progress bar to show download progress
|
||||
import Bundle from '../features/ui/components/bundle';
|
||||
import { visibleReactions } from '../initial_state';
|
||||
|
||||
export const textForScreenReader = (intl, status, rebloggedByText = false) => {
|
||||
const displayName = status.getIn(['account', 'display_name']);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { reduceMotion } from '../initial_state';
|
||||
import { autoPlayGif, reduceMotion } from '../initial_state';
|
||||
import spring from 'react-motion/lib/spring';
|
||||
import TransitionMotion from 'react-motion/lib/TransitionMotion';
|
||||
import classNames from 'classnames';
|
||||
|
|
@ -9,7 +9,6 @@ import React from 'react';
|
|||
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
|
||||
import AnimatedNumber from './animated_number';
|
||||
import { assetHost } from '../utils/config';
|
||||
import { autoPlayGif } from '../initial_state';
|
||||
|
||||
export default class StatusReactions extends ImmutablePureComponent {
|
||||
|
||||
|
|
@ -101,19 +100,12 @@ class Reaction extends ImmutablePureComponent {
|
|||
render() {
|
||||
const { reaction } = this.props;
|
||||
|
||||
let shortCode = reaction.get('name');
|
||||
|
||||
if (unicodeMapping[shortCode]) {
|
||||
shortCode = unicodeMapping[shortCode].shortCode;
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
className={classNames('reactions-bar__item', { active: reaction.get('me') })}
|
||||
onClick={this.handleClick}
|
||||
onMouseEnter={this.handleMouseEnter}
|
||||
onMouseLeave={this.handleMouseLeave}
|
||||
title={`:${shortCode}:`}
|
||||
style={this.props.style}
|
||||
>
|
||||
<span className='reactions-bar__item__emoji'>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue