Skip to content

Commit

Permalink
Further reduce divergences with upstream (at that point in time)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Nov 15, 2023
1 parent 63fcbf1 commit 331c2b6
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions app/javascript/flavours/glitch/components/account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import Permalink from './permalink';
import { RelativeTimestamp } from './relative_timestamp';



const messages = defineMessages({
follow: { id: 'account.follow', defaultMessage: 'Follow' },
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' },
requested: { id: 'account.requested', defaultMessage: 'Awaiting approval' },
unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' },
unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' },
mute_notifications: { id: 'account.mute_notifications', defaultMessage: 'Mute notifications from @{name}' },
Expand Down Expand Up @@ -73,16 +74,7 @@ class Account extends ImmutablePureComponent {
};

render () {
const {
account,
hidden,
intl,
onActionClick,
actionIcon,
actionTitle,
defaultAction,
size,
} = this.props;
const { account, intl, hidden, onActionClick, actionIcon, actionTitle, defaultAction, size } = this.props;

if (!account) {
return (
Expand All @@ -108,8 +100,8 @@ class Account extends ImmutablePureComponent {

let buttons;

if (onActionClick) {
if (actionIcon) {
if (actionIcon) {
if (onActionClick) {
buttons = <IconButton icon={actionIcon} title={actionTitle} onClick={this.handleAction} />;
}
} else if (account.get('id') !== me && account.get('relationship', null) !== null) {
Expand Down Expand Up @@ -157,11 +149,10 @@ class Account extends ImmutablePureComponent {
{mute_expires_at}
<DisplayName account={account} />
</Permalink>
{buttons ?
<div className='account__relationship'>
{buttons}
</div>
: null}

<div className='account__relationship'>
{buttons}
</div>
</div>
</div>
);
Expand Down

0 comments on commit 331c2b6

Please sign in to comment.