about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/bot_icon.js
blob: f4bd702822eccfbf63edab72fe0059c42034fa82 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

export default class BotIcon extends ImmutablePureComponent {

  static propTypes = {
    account: ImmutablePropTypes.map.isRequired,
  };

  render () {
    const { account } = this.props;

    if (account.get('bot')) {
      return (
        <i className='fa fa-fw fa-robot bot-icon' />
      );
    }

    return '';
  }

}