From 00db5c8ade430d7d51661323d79f0c955faa5821 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 23 Apr 2023 22:24:53 +0200 Subject: [PATCH] [Glitch] Split VerifiedBadge from Account component Partial port of 0461f83320378fb8cee679da896ce35cec5bcbf3 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/components/account.jsx | 22 +--------------- .../glitch/components/verified_badge.jsx | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 app/javascript/flavours/glitch/components/verified_badge.jsx diff --git a/app/javascript/flavours/glitch/components/account.jsx b/app/javascript/flavours/glitch/components/account.jsx index d94d51067d..4eda14daf4 100644 --- a/app/javascript/flavours/glitch/components/account.jsx +++ b/app/javascript/flavours/glitch/components/account.jsx @@ -8,8 +8,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { Skeleton } from 'flavours/glitch/components/skeleton'; import { counterRenderer } from 'flavours/glitch/components/common_counter'; import ShortNumber from 'flavours/glitch/components/short_number'; -import Icon from 'flavours/glitch/components/icon'; import classNames from 'classnames'; +import VerifiedBadge from 'flavours/glitch/components/verified_badge'; import { me } from '../initial_state'; @@ -31,26 +31,6 @@ const messages = defineMessages({ block: { id: 'account.block', defaultMessage: 'Block @{name}' }, }); -class VerifiedBadge extends React.PureComponent { - - static propTypes = { - link: PropTypes.string.isRequired, - verifiedAt: PropTypes.string.isRequired, - }; - - render () { - const { link } = this.props; - - return ( - - - - - ); - } - -} - class Account extends ImmutablePureComponent { static propTypes = { diff --git a/app/javascript/flavours/glitch/components/verified_badge.jsx b/app/javascript/flavours/glitch/components/verified_badge.jsx new file mode 100644 index 0000000000..575cbcde1a --- /dev/null +++ b/app/javascript/flavours/glitch/components/verified_badge.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import Icon from 'flavours/glitch/components/icon'; + +class VerifiedBadge extends React.PureComponent { + + static propTypes = { + link: PropTypes.string.isRequired, + verifiedAt: PropTypes.string.isRequired, + }; + + render () { + const { link } = this.props; + + return ( + + + + + ); + } + +} + +export default VerifiedBadge; \ No newline at end of file