dont render if reduced motion
This commit is contained in:
@@ -153,23 +153,25 @@ export function CountWheel({
|
|||||||
{formattedCount}
|
{formattedCount}
|
||||||
</Text>
|
</Text>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
<Animated.View
|
{shouldAnimate ? (
|
||||||
entering={exitingAnimation}
|
<Animated.View
|
||||||
// Add 2 to the key so there are never duplicates
|
entering={exitingAnimation}
|
||||||
key={key + 2}
|
// Add 2 to the key so there are never duplicates
|
||||||
style={[a.absolute]}
|
key={key + 2}
|
||||||
aria-disabled={true}>
|
style={[a.absolute]}
|
||||||
<Text
|
aria-disabled={true}>
|
||||||
style={[
|
<Text
|
||||||
big ? a.text_md : {fontSize: 15},
|
style={[
|
||||||
a.user_select_none,
|
big ? a.text_md : {fontSize: 15},
|
||||||
isLiked
|
a.user_select_none,
|
||||||
? [a.font_bold, s.likeColor]
|
isLiked
|
||||||
: {color: t.palette.contrast_500},
|
? [a.font_bold, s.likeColor]
|
||||||
]}>
|
: {color: t.palette.contrast_500},
|
||||||
{formattedPrevCount}
|
]}>
|
||||||
</Text>
|
{formattedPrevCount}
|
||||||
</Animated.View>
|
</Text>
|
||||||
|
</Animated.View>
|
||||||
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
</LayoutAnimationConfig>
|
</LayoutAnimationConfig>
|
||||||
|
|||||||
@@ -97,22 +97,24 @@ export function CountWheel({
|
|||||||
{formattedCount}
|
{formattedCount}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
{shouldAnimate ? (
|
||||||
style={{position: 'absolute'}}
|
<View
|
||||||
aria-disabled={true}
|
style={{position: 'absolute'}}
|
||||||
// @ts-expect-error is div
|
aria-disabled={true}
|
||||||
ref={prevCountView}>
|
// @ts-expect-error is div
|
||||||
<Text
|
ref={prevCountView}>
|
||||||
style={[
|
<Text
|
||||||
big ? a.text_md : {fontSize: 15},
|
style={[
|
||||||
a.user_select_none,
|
big ? a.text_md : {fontSize: 15},
|
||||||
isLiked
|
a.user_select_none,
|
||||||
? [a.font_bold, s.likeColor]
|
isLiked
|
||||||
: {color: t.palette.contrast_500},
|
? [a.font_bold, s.likeColor]
|
||||||
]}>
|
: {color: t.palette.contrast_500},
|
||||||
{formattedPrevCount}
|
]}>
|
||||||
</Text>
|
{formattedPrevCount}
|
||||||
</View>
|
</Text>
|
||||||
|
</View>
|
||||||
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user