From 3fe21ce268e429138af9c1714b42ba87c8533f29 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 1 Apr 2022 17:38:36 -0500 Subject: [PATCH] StatusActionBar: conditionally render dumb Like button --- app/soapbox/components/status_action_bar.js | 87 ++++++++++--------- .../ui/status/status-action-button.tsx | 7 +- 2 files changed, 54 insertions(+), 40 deletions(-) diff --git a/app/soapbox/components/status_action_bar.js b/app/soapbox/components/status_action_bar.js index e098713df..6f9dfe35d 100644 --- a/app/soapbox/components/status_action_bar.js +++ b/app/soapbox/components/status_action_bar.js @@ -167,8 +167,6 @@ class StatusActionBar extends ImmutablePureComponent { handleLikeButtonClick = e => { const { features } = this.props; - e.stopPropagation(); - const meEmojiReact = getReactForStatus(this.props.status, this.props.allowedEmoji) || '👍'; if (features.emojiReacts && isUserTouching()) { @@ -650,45 +648,56 @@ class StatusActionBar extends ImmutablePureComponent { )} -
- - )} + {features.emojiReacts ? ( +
- - - - {emojiReactCount > 0 && ( - (features.exposableReactions && !features.emojiReacts) ? ( - + )} + > + - ) : ( - - ) - )} -
+
+ + {emojiReactCount > 0 && ( + (features.exposableReactions && !features.emojiReacts) ? ( + + ) : ( + + ) + )} +
+ ): ( + + )} {canShare && ( = ({ icon, title, to, ac src={icon} onClick={handleClick} className={classNames('text-gray-400 hover:text-gray-600 dark:hover:text-white', { - 'text-success-600 hover:text-success-600': active, + 'text-accent-300 hover:text-accent-300': active, + // TODO: repost button + // 'text-success-600 hover:text-success-600': active, + })} + iconClassName={classNames({ + 'fill-accent-300': active, })} />