import { getAvatarUrl } from '../../helpers/User';
import i18n from '../../i18n';
-const Box = ({ user }) => user ?
+const Box = ({ discriminator, user }) => user ?
<span className="user-box">
<img alt="" src={getAvatarUrl(user)} />
<span>{user.username}</span>
- <span className="text-muted">
- {'#'}
- {user.discriminator}
- </span>
+ {discriminator ?
+ <span className="text-muted">
+ {'#'}
+ {user.discriminator}
+ </span>
+ : null}
</span>
:
<span>{i18n.t('general.anonymous')}</span>
;
Box.propTypes = {
+ discriminator: PropTypes.bool,
user: PropTypes.shape({
discriminator: PropTypes.string,
username: PropTypes.string,