fix prop names (#6130)
This commit is contained in:
@@ -39,15 +39,15 @@ export function CountWheel({
|
|||||||
likeCount,
|
likeCount,
|
||||||
big,
|
big,
|
||||||
isLiked,
|
isLiked,
|
||||||
isToggle,
|
hasBeenToggled,
|
||||||
}: {
|
}: {
|
||||||
likeCount: number
|
likeCount: number
|
||||||
big?: boolean
|
big?: boolean
|
||||||
isLiked: boolean
|
isLiked: boolean
|
||||||
isToggle: boolean
|
hasBeenToggled: boolean
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const shouldAnimate = !useReducedMotion() && isToggle
|
const shouldAnimate = !useReducedMotion() && hasBeenToggled
|
||||||
const shouldRoll = decideShouldRoll(isLiked, likeCount)
|
const shouldRoll = decideShouldRoll(isLiked, likeCount)
|
||||||
|
|
||||||
const countView = React.useRef<HTMLDivElement>(null)
|
const countView = React.useRef<HTMLDivElement>(null)
|
||||||
|
|||||||
@@ -41,15 +41,15 @@ const circle2Keyframe = [
|
|||||||
export function AnimatedLikeIcon({
|
export function AnimatedLikeIcon({
|
||||||
isLiked,
|
isLiked,
|
||||||
big,
|
big,
|
||||||
isToggle,
|
hasBeenToggled,
|
||||||
}: {
|
}: {
|
||||||
isLiked: boolean
|
isLiked: boolean
|
||||||
big?: boolean
|
big?: boolean
|
||||||
isToggle: boolean
|
hasBeenToggled: boolean
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const size = big ? 22 : 18
|
const size = big ? 22 : 18
|
||||||
const shouldAnimate = !useReducedMotion() && isToggle
|
const shouldAnimate = !useReducedMotion() && hasBeenToggled
|
||||||
const prevIsLiked = React.useRef(isLiked)
|
const prevIsLiked = React.useRef(isLiked)
|
||||||
|
|
||||||
const likeIconRef = React.useRef<HTMLDivElement>(null)
|
const likeIconRef = React.useRef<HTMLDivElement>(null)
|
||||||
|
|||||||
Reference in New Issue
Block a user