about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorbeatrix-bitrot <beatrix.bitrot@gmail.com>2017-06-24 03:51:01 +0000
committerbeatrix-bitrot <beatrix.bitrot@gmail.com>2017-06-24 03:51:01 +0000
commit8b23bf7cbdc525f1fb0926456752e13012dc8e91 (patch)
treeaf48c0734a12f4b5ffbf0f5058e16f8fe5c39ab6 /app/javascript
parentf1a60d4b81ced3bc6d2bc7251b6f6f75d6d76593 (diff)
clean up old avatar class
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/account/components/header.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js
index f5fce482a..6f802ceda 100644
--- a/app/javascript/mastodon/features/account/components/header.js
+++ b/app/javascript/mastodon/features/account/components/header.js
@@ -65,61 +65,6 @@ const processBio = (data) => {
   return props;
 };
 
-const makeMapStateToProps = () => {
-  const mapStateToProps = state => ({
-    autoPlayGif: state.getIn(['meta', 'auto_play_gif']),
-  });
-
-  return mapStateToProps;
-};
-
-class Avatar extends ImmutablePureComponent {
-
-  static propTypes = {
-    account: ImmutablePropTypes.map.isRequired,
-    autoPlayGif: PropTypes.bool.isRequired,
-  };
-
-  state = {
-    isHovered: false,
-  };
-
-  handleMouseOver = () => {
-    if (this.state.isHovered) return;
-    this.setState({ isHovered: true });
-  }
-
-  handleMouseOut = () => {
-    if (!this.state.isHovered) return;
-    this.setState({ isHovered: false });
-  }
-
-  render () {
-    const { account, autoPlayGif }   = this.props;
-    const { isHovered } = this.state;
-
-    return (
-      <Motion defaultStyle={{ radius: 90 }} style={{ radius: spring(isHovered ? 30 : 90, { stiffness: 180, damping: 12 }) }}>
-        {({ radius }) =>
-          <a // eslint-disable-line jsx-a11y/anchor-has-content
-            href={account.get('url')}
-            className='account__header__avatar'
-            target='_blank'
-            rel='noopener'
-            style={{ borderRadius: `${radius}px`, backgroundImage: `url(${autoPlayGif || isHovered ? account.get('avatar') : account.get('avatar_static')})` }}
-            onMouseOver={this.handleMouseOver}
-            onMouseOut={this.handleMouseOut}
-            onFocus={this.handleMouseOver}
-            onBlur={this.handleMouseOut}
-          />
-        }
-      </Motion>
-    );
-  }
-
-}
-
-@connect(makeMapStateToProps)
 @injectIntl
 export default class Header extends ImmutablePureComponent {