Accounts: call isVerified in the places it's missing
This commit is contained in:
parent
1be73d13a1
commit
5f7a201f08
|
@ -2,10 +2,9 @@ import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { getAcct } from 'soapbox/utils/accounts';
|
import { getAcct, isVerified } from 'soapbox/utils/accounts';
|
||||||
import StillImage from 'soapbox/components/still_image';
|
import StillImage from 'soapbox/components/still_image';
|
||||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||||
import { List as ImmutableList } from 'immutable';
|
|
||||||
import { displayFqn } from 'soapbox/utils/state';
|
import { displayFqn } from 'soapbox/utils/state';
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
@ -27,7 +26,7 @@ const ProfilePreview = ({ account, displayFqn }) => (
|
||||||
<bdi>
|
<bdi>
|
||||||
<strong className='emojify p-name'>
|
<strong className='emojify p-name'>
|
||||||
{account.get('display_name')}
|
{account.get('display_name')}
|
||||||
{account.getIn(['pleroma', 'tags'], ImmutableList()).includes('verified') && <VerificationBadge />}
|
{isVerified(account) && <VerificationBadge />}
|
||||||
</strong>
|
</strong>
|
||||||
</bdi>
|
</bdi>
|
||||||
<span>@{getAcct(account, displayFqn)}</span>
|
<span>@{getAcct(account, displayFqn)}</span>
|
||||||
|
|
|
@ -8,11 +8,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
import Avatar from 'soapbox/components/avatar';
|
import Avatar from 'soapbox/components/avatar';
|
||||||
import { shortNumberFormat } from 'soapbox/utils/numbers';
|
import { shortNumberFormat } from 'soapbox/utils/numbers';
|
||||||
import { getAcct } from 'soapbox/utils/accounts';
|
import { getAcct, isVerified } from 'soapbox/utils/accounts';
|
||||||
import { displayFqn } from 'soapbox/utils/state';
|
import { displayFqn } from 'soapbox/utils/state';
|
||||||
import StillImage from 'soapbox/components/still_image';
|
import StillImage from 'soapbox/components/still_image';
|
||||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||||
import { List as ImmutableList } from 'immutable';
|
|
||||||
|
|
||||||
class UserPanel extends ImmutablePureComponent {
|
class UserPanel extends ImmutablePureComponent {
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ class UserPanel extends ImmutablePureComponent {
|
||||||
if (!account) return null;
|
if (!account) return null;
|
||||||
const displayNameHtml = { __html: account.get('display_name_html') };
|
const displayNameHtml = { __html: account.get('display_name_html') };
|
||||||
const acct = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
|
const acct = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
|
||||||
const verified = account.getIn(['pleroma', 'tags'], ImmutableList()).includes('verified');
|
|
||||||
const header = account.get('header');
|
const header = account.get('header');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -51,7 +49,7 @@ class UserPanel extends ImmutablePureComponent {
|
||||||
<h1>
|
<h1>
|
||||||
<Link to={`/@${account.get('acct')}`}>
|
<Link to={`/@${account.get('acct')}`}>
|
||||||
<span className='user-panel__account__name' dangerouslySetInnerHTML={displayNameHtml} />
|
<span className='user-panel__account__name' dangerouslySetInnerHTML={displayNameHtml} />
|
||||||
{verified && <VerificationBadge />}
|
{isVerified(account) && <VerificationBadge />}
|
||||||
<small className='user-panel__account__username'>@{getAcct(account, displayFqn)}</small>
|
<small className='user-panel__account__username'>@{getAcct(account, displayFqn)}</small>
|
||||||
</Link>
|
</Link>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
Loading…
Reference in New Issue