import React from 'react';
import Avatar from 'misago/components/avatar'; // jshint ignore:line
import Status, { StatusIcon, StatusLabel } from 'misago/components/user-status'; // jshint ignore:line
export default class extends React.Component {
getClassName() {
if (this.props.user.rank.css_class) {
return 'user-card user-card-' + this.props.user.rank.css_class + ' ui-ready';
} else {
return 'user-card ui-ready';
}
}
getUserStatus() {
if (this.props.showStatus) {
if (this.props.user.status) {
/* jshint ignore:start */
return
;
/* jshint ignore:end */
} else {
/* jshint ignore:start */
return
;
/* jshint ignore:end */
}
} else {
return null;
}
}
getUserTitle() {
if (this.props.user.title) {
/* jshint ignore:start */
return {this.props.user.title};
/* jshint ignore:end */
} else {
return null;
}
}
getUserJoinedOn() {
/* jshint ignore:start */
let title = interpolate(gettext("Joined on %(joined_on)s"), {
'joined_on': this.props.user.joined_on.format('LL, LT')
}, true);
let age = interpolate(gettext("Joined %(joined_on)s"), {
'joined_on': this.props.user.joined_on.fromNow()
}, true);
return
{age}
;
/* jshint ignore:end */
}
render() {
/* jshint ignore:start */
return
{this.getUserStatus()}
{this.getUserTitle()}
{this.getUserJoinedOn()}
-
{this.props.user.posts}
{gettext("posts")}
-
{this.props.user.threads}
{gettext("threads")}
-
{this.props.user.followers}
{gettext("followers")}
;
/* jshint ignore:end */
}
}