From 4abcd65ccf94e36251142faeabdac42cada490fe Mon Sep 17 00:00:00 2001 From: Hailey Date: Mon, 2 Sep 2024 03:15:31 -0700 Subject: More tweaks to animation (#5082) --- src/lib/custom-animations/CountWheel.tsx | 4 +-- src/lib/custom-animations/CountWheel.web.tsx | 5 ++- src/lib/custom-animations/LikeIcon.tsx | 48 +++++++++++++--------------- src/lib/custom-animations/LikeIcon.web.tsx | 2 ++ 4 files changed, 28 insertions(+), 31 deletions(-) (limited to 'src/lib') diff --git a/src/lib/custom-animations/CountWheel.tsx b/src/lib/custom-animations/CountWheel.tsx index dfa697911..1a8676712 100644 --- a/src/lib/custom-animations/CountWheel.tsx +++ b/src/lib/custom-animations/CountWheel.tsx @@ -151,12 +151,12 @@ export function CountWheel({ {formattedCount} - {shouldAnimate ? ( + {shouldAnimate && (likeCount > 1 || !isLiked) ? ( - {shouldAnimate ? ( + {shouldAnimate && (likeCount > 1 || !isLiked) ? ( diff --git a/src/lib/custom-animations/LikeIcon.tsx b/src/lib/custom-animations/LikeIcon.tsx index 06d5c2850..f5802eccb 100644 --- a/src/lib/custom-animations/LikeIcon.tsx +++ b/src/lib/custom-animations/LikeIcon.tsx @@ -99,37 +99,33 @@ export function AnimatedLikeIcon({ entering={ shouldAnimate ? circle1Keyframe.duration(300) : undefined } - style={[ - { - position: 'absolute', - backgroundColor: s.likeColor.color, - top: 0, - left: 0, - width: size, - height: size, - zIndex: -1, - pointerEvents: 'none', - borderRadius: size / 2, - }, - ]} + style={{ + position: 'absolute', + backgroundColor: s.likeColor.color, + top: 0, + left: 0, + width: size, + height: size, + zIndex: -1, + pointerEvents: 'none', + borderRadius: size / 2, + }} /> ) : null} diff --git a/src/lib/custom-animations/LikeIcon.web.tsx b/src/lib/custom-animations/LikeIcon.web.tsx index c131dcf67..6dc94c291 100644 --- a/src/lib/custom-animations/LikeIcon.web.tsx +++ b/src/lib/custom-animations/LikeIcon.web.tsx @@ -93,6 +93,7 @@ export function AnimatedLikeIcon({ zIndex: -1, pointerEvents: 'none', borderRadius: size / 2, + opacity: 0, }} /> -- cgit 1.4.1