MCPcopy
hub / github.com/BlueWallet/BlueWallet / useBounceAnimation

Function useBounceAnimation

hooks/useBounceAnimation.ts:4–24  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

2import { Animated } from 'react-native';
3
4const useBounceAnimation = (query: string) => {
5 const bounceAnim = useRef(new Animated.Value(1.0)).current;
6
7 useEffect(() => {
8 if (query) {
9 Animated.timing(bounceAnim, {
10 toValue: 1.08, // Reduced from 1.2 to 1.08 for more subtle animation
11 duration: 150,
12 useNativeDriver: true,
13 }).start(() => {
14 Animated.timing(bounceAnim, {
15 toValue: 1.0,
16 duration: 150,
17 useNativeDriver: true,
18 }).start();
19 });
20 }
21 }, [bounceAnim, query]);
22
23 return bounceAnim;
24};
25
26export default useBounceAnimation;

Callers 2

HighlightedTextFunction · 0.85
ManageWalletsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected