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.
This commit is contained in:
parent
44a3584e2d
commit
2991a7cfe6
79 changed files with 838 additions and 1128 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue