Remove isVerified() function
This commit is contained in:
parent
3095ee5db1
commit
d86eac4c1a
|
@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||
import { connect } from 'react-redux';
|
||||
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import { isVerified } from 'soapbox/utils/accounts';
|
||||
import { displayFqn } from 'soapbox/utils/state';
|
||||
|
||||
import { getAcct } from '../utils/accounts';
|
||||
|
@ -38,7 +37,7 @@ class DisplayName extends React.PureComponent {
|
|||
const { account, displayFqn, others, children, withDate } = this.props;
|
||||
|
||||
let displayName, suffix;
|
||||
const verified = isVerified(account);
|
||||
const verified = account.get('verified');
|
||||
|
||||
const createdAt = account.get('created_at');
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import {
|
|||
isStaff,
|
||||
isAdmin,
|
||||
isModerator,
|
||||
isVerified,
|
||||
isLocal,
|
||||
isRemote,
|
||||
getDomain,
|
||||
|
@ -451,7 +450,7 @@ class Header extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
if (isVerified(account)) {
|
||||
if (account.get('verified')) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.unverifyUser, { name: account.get('username') }),
|
||||
action: this.props.onUnverifyUser,
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
|
|||
|
||||
import StillImage from 'soapbox/components/still_image';
|
||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||
import { getAcct, isVerified } from 'soapbox/utils/accounts';
|
||||
import { getAcct } from 'soapbox/utils/accounts';
|
||||
import { displayFqn } from 'soapbox/utils/state';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
|
@ -28,7 +28,7 @@ const ProfilePreview = ({ account, displayFqn }) => (
|
|||
<bdi>
|
||||
<strong className='emojify p-name'>
|
||||
{account.get('display_name')}
|
||||
{isVerified(account) && <VerificationBadge />}
|
||||
{account.get('verified') && <VerificationBadge />}
|
||||
</strong>
|
||||
</bdi>
|
||||
<span>@{getAcct(account, displayFqn)}</span>
|
||||
|
|
|
@ -25,7 +25,6 @@ import {
|
|||
SimpleTextarea,
|
||||
} from 'soapbox/features/forms';
|
||||
import { makeGetAccount } from 'soapbox/selectors';
|
||||
import { isVerified } from 'soapbox/utils/accounts';
|
||||
import { getFeatures } from 'soapbox/utils/features';
|
||||
import resizeImage from 'soapbox/utils/resize_image';
|
||||
|
||||
|
@ -263,7 +262,7 @@ class EditProfile extends ImmutablePureComponent {
|
|||
|
||||
render() {
|
||||
const { intl, maxFields, account, verifiedCanEditName, supportsBirthdays, supportsEmailList } = this.props;
|
||||
const verified = isVerified(account);
|
||||
const verified = account.get('verified');
|
||||
const canEditName = verifiedCanEditName || !verified;
|
||||
|
||||
return (
|
||||
|
|
|
@ -15,7 +15,7 @@ import Icon from 'soapbox/components/icon';
|
|||
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
|
||||
import { CryptoAddress } from 'soapbox/features/ui/util/async-components';
|
||||
import { getAcct, isAdmin, isModerator, isLocal, isVerified } from 'soapbox/utils/accounts';
|
||||
import { getAcct, isAdmin, isModerator, isLocal } from 'soapbox/utils/accounts';
|
||||
import { displayFqn } from 'soapbox/utils/state';
|
||||
|
||||
import ProfileStats from './profile_stats';
|
||||
|
@ -147,7 +147,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
|
|||
const deactivated = !account.getIn(['pleroma', 'is_active'], true);
|
||||
const displayNameHtml = deactivated ? { __html: intl.formatMessage(messages.deactivated) } : { __html: account.get('display_name_html') };
|
||||
const memberSinceDate = intl.formatDate(account.get('created_at'), { month: 'long', year: 'numeric' });
|
||||
const verified = isVerified(account);
|
||||
const verified = account.get('verified');
|
||||
const badges = this.getBadges();
|
||||
|
||||
return (
|
||||
|
|
|
@ -9,7 +9,7 @@ import { Link } from 'react-router-dom';
|
|||
import Avatar from 'soapbox/components/avatar';
|
||||
import StillImage from 'soapbox/components/still_image';
|
||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||
import { getAcct, isVerified } from 'soapbox/utils/accounts';
|
||||
import { getAcct } from 'soapbox/utils/accounts';
|
||||
import { shortNumberFormat } from 'soapbox/utils/numbers';
|
||||
import { displayFqn } from 'soapbox/utils/state';
|
||||
|
||||
|
@ -51,7 +51,7 @@ class UserPanel extends ImmutablePureComponent {
|
|||
<h1>
|
||||
<Link to={`/@${account.get('acct')}`}>
|
||||
<span className='user-panel__account__name' dangerouslySetInnerHTML={displayNameHtml} />
|
||||
{isVerified(account) && <VerificationBadge />}
|
||||
{account.get('verified') && <VerificationBadge />}
|
||||
<small className='user-panel__account__username'>@{getAcct(account, displayFqn)}</small>
|
||||
</Link>
|
||||
</h1>
|
||||
|
|
|
@ -64,8 +64,6 @@ export const isLocal = account => {
|
|||
|
||||
export const isRemote = account => !isLocal(account);
|
||||
|
||||
export const isVerified = account => account.get('verified') === true;
|
||||
|
||||
export const accountToMention = account => {
|
||||
return ImmutableMap({
|
||||
id: account.get('id'),
|
||||
|
|
Loading…
Reference in New Issue