From 4b1fd3c22f5c2e0448fd749cbd3b06ef40a9ebda Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 28 Jul 2021 08:09:25 -0400 Subject: [PATCH 1/9] file reactions recon --- ui/component/fileReactions/view.jsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ui/component/fileReactions/view.jsx b/ui/component/fileReactions/view.jsx index a6f60ebb5..e8c10ae4f 100644 --- a/ui/component/fileReactions/view.jsx +++ b/ui/component/fileReactions/view.jsx @@ -6,6 +6,7 @@ import classnames from 'classnames'; import Button from 'component/button'; import { formatNumberWithCommas } from 'util/number'; import NudgeFloating from 'component/nudgeFloating'; +import { SIMPLE_SITE } from 'config'; type Props = { claim: StreamClaim, @@ -31,9 +32,16 @@ function FileReactions(props: Props) { dislikeCount, livestream, } = props; + const claimId = claim && claim.claim_id; const channel = claim && claim.signing_channel && claim.signing_channel.name; const isCollection = claim && claim.value_type === 'collection'; // hack because nudge gets cut off by card on cols. + const likeIcon = SIMPLE_SITE ? (myReaction === REACTION_TYPES.LIKE ? ICONS.FIRE_ACTIVE : ICONS.FIRE) : ICONS.UPVOTE; + const dislikeIcon = SIMPLE_SITE + ? myReaction === REACTION_TYPES.DISLIKE + ? ICONS.SLIME_ACTIVE + : ICONS.SLIME + : ICONS.DOWNVOTE; React.useEffect(() => { function fetchReactions() { doFetchReactions(claimId); @@ -71,7 +79,7 @@ function FileReactions(props: Props) { className={classnames('button--file-action', { 'button--fire': myReaction === REACTION_TYPES.LIKE })} label={ <> - {myReaction === REACTION_TYPES.LIKE && ( + {myReaction === REACTION_TYPES.LIKE && SIMPLE_SITE && ( <>
@@ -86,7 +94,7 @@ function FileReactions(props: Props) { } iconSize={18} - icon={myReaction === REACTION_TYPES.LIKE ? ICONS.FIRE_ACTIVE : ICONS.FIRE} + icon={likeIcon} onClick={() => doReactionLike(uri)} />