From 0014d4363fa869389d7739ff9e3ffbbb03f5679c Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 3 Sep 2024 10:55:53 -0700 Subject: Only animate the like icon when from an actual toggle (#5096) --- src/lib/custom-animations/LikeIcon.web.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/custom-animations/LikeIcon.web.tsx') diff --git a/src/lib/custom-animations/LikeIcon.web.tsx b/src/lib/custom-animations/LikeIcon.web.tsx index 6dc94c291..ef330bc62 100644 --- a/src/lib/custom-animations/LikeIcon.web.tsx +++ b/src/lib/custom-animations/LikeIcon.web.tsx @@ -41,13 +41,15 @@ const circle2Keyframe = [ export function AnimatedLikeIcon({ isLiked, big, + isToggle, }: { isLiked: boolean big?: boolean + isToggle: boolean }) { const t = useTheme() const size = big ? 22 : 18 - const shouldAnimate = !useReducedMotion() + const shouldAnimate = !useReducedMotion() && isToggle const prevIsLiked = React.useRef(isLiked) const likeIconRef = React.useRef(null) -- cgit 1.4.1