about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/display_name.js
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-05-12 21:44:10 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-12 14:44:10 +0200
commit2991a7cfe685ca9b42230b7030b9e7d0ece94c88 (patch)
tree72da0f02bc6279aeab1e641fb7d51527efcb9066 /app/javascript/mastodon/components/display_name.js
parent44a3584e2d54488393e6f50e482ed61d2765e312 (diff)
Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook.

Added babel-plugin-transform-class-properties as a Babel plugin.
Diffstat (limited to 'app/javascript/mastodon/components/display_name.js')
-rw-r--r--app/javascript/mastodon/components/display_name.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/javascript/mastodon/components/display_name.js b/app/javascript/mastodon/components/display_name.js
index 6bdd06db7..e122debf4 100644
--- a/app/javascript/mastodon/components/display_name.js
+++ b/app/javascript/mastodon/components/display_name.js
@@ -5,6 +5,10 @@ import emojify from '../emoji';
 
 class DisplayName extends React.PureComponent {
 
+  static propTypes = {
+    account: ImmutablePropTypes.map.isRequired
+  };
+
   render () {
     const displayName     = this.props.account.get('display_name').length === 0 ? this.props.account.get('username') : this.props.account.get('display_name');
     const displayNameHTML = { __html: emojify(escapeTextContentForBrowser(displayName)) };
@@ -16,10 +20,6 @@ class DisplayName extends React.PureComponent {
     );
   }
 
-};
-
-DisplayName.propTypes = {
-  account: ImmutablePropTypes.map.isRequired
 }
 
 export default DisplayName;