Only animate the like icon when from an actual toggle (#5096)

This commit is contained in:
Hailey
2024-09-03 10:55:53 -07:00
committed by GitHub
parent bd42f770b8
commit 0014d4363f
5 changed files with 20 additions and 9 deletions
+3 -1
View File
@@ -39,13 +39,15 @@ export function CountWheel({
likeCount,
big,
isLiked,
isToggle,
}: {
likeCount: number
big?: boolean
isLiked: boolean
isToggle: boolean
}) {
const t = useTheme()
const shouldAnimate = !useReducedMotion()
const shouldAnimate = !useReducedMotion() && isToggle
const shouldRoll = decideShouldRoll(isLiked, likeCount)
const countView = React.useRef<HTMLDivElement>(null)